diff options
Diffstat (limited to 'FreeRTOS-Plus/Test/CMock/examples/temp_sensor/test/TestTimerConductor.c')
-rw-r--r-- | FreeRTOS-Plus/Test/CMock/examples/temp_sensor/test/TestTimerConductor.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/FreeRTOS-Plus/Test/CMock/examples/temp_sensor/test/TestTimerConductor.c b/FreeRTOS-Plus/Test/CMock/examples/temp_sensor/test/TestTimerConductor.c new file mode 100644 index 000000000..8064a8c51 --- /dev/null +++ b/FreeRTOS-Plus/Test/CMock/examples/temp_sensor/test/TestTimerConductor.c @@ -0,0 +1,32 @@ +#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(); +} |