CMock/examples/temp_sensor/test/TestTimerConductor.c
2025-01-01 12:05:55 -05:00

40 lines
941 B
C

/* =========================================================================
CMock - Automatic Mock Generation for C
ThrowTheSwitch.org
Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
SPDX-License-Identifier: MIT
========================================================================= */
#include "unity.h"
#include "Types.h"
#include "TimerConductor.h"
#include "MockTimerHardware.h"
#include "MockTimerModel.h"
#include "MockTimerInterruptHandler.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void testInitShouldCallHardwareInit(void)
{
TimerHardware_Init_Expect();
TimerConductor_Init();
}
void testRunShouldGetSystemTimeAndPassOnToModelForEventScheduling(void)
{
Timer_GetSystemTime_ExpectAndReturn(1230);
TimerModel_UpdateTime_Expect(1230);
TimerConductor_Run();
Timer_GetSystemTime_ExpectAndReturn(837460);
TimerModel_UpdateTime_Expect(837460);
TimerConductor_Run();
}