Sha256: f430c2028004bcb2309572ffdc531a9fe0876cb5cd20cad3339a055d3ea05485

Contents?: true

Size: 835 Bytes

Versions: 54

Compression:

Stored size: 835 Bytes

Contents

#include "unity.h"
#include "Types.h"
#include "AdcModel.h"
#include "MockTaskScheduler.h"
#include "MockTemperatureCalculator.h"
#include "MockTemperatureFilter.h"

void setUp(void)
{
}

void tearDown(void)
{
}

void testDoGetSampleShouldReturn_FALSE_WhenTaskSchedulerReturns_FALSE(void)
{
  TaskScheduler_DoAdc_ExpectAndReturn(FALSE);
  TEST_ASSERT_EQUAL(FALSE, AdcModel_DoGetSample());
}

void testDoGetSampleShouldReturn_TRUE_WhenTaskSchedulerReturns_TRUE(void)
{
  TaskScheduler_DoAdc_ExpectAndReturn(TRUE);
  TEST_ASSERT_EQUAL(TRUE, AdcModel_DoGetSample());
}

void testProcessInputShouldDelegateToTemperatureCalculatorAndPassResultToFilter(void)
{
  TemperatureCalculator_Calculate_ExpectAndReturn(21473, 23.5f);
  TemperatureFilter_ProcessInput_Expect(23.5f);
  AdcModel_ProcessInput(21473);
}

Version data entries

54 entries across 39 versions & 1 rubygems

Version Path
ceedling-0.29.1 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.29.1 vendor/cmock/examples/temp_sensor/test/TestAdcModel.c
ceedling-0.29.0 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.29.0 vendor/cmock/examples/temp_sensor/test/TestAdcModel.c
ceedling-0.19.0 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.18.0 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.18.0 vendor/cmock/examples/test/TestAdcModel.c
ceedling-0.17.0 vendor/cmock/examples/test/TestAdcModel.c
ceedling-0.17.0 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.16.0 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.16.0 vendor/cmock/examples/test/TestAdcModel.c
ceedling-0.15.6 vendor/cmock/examples/test/TestAdcModel.c
ceedling-0.15.6 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.15.5 vendor/cmock/examples/test/TestAdcModel.c
ceedling-0.15.5 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.15.4 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.15.4 vendor/cmock/examples/test/TestAdcModel.c
ceedling-0.15.3 examples/temp_sensor/test/TestAdcModel.c
ceedling-0.15.3 vendor/cmock/examples/test/TestAdcModel.c
ceedling-0.15.2 vendor/cmock/examples/test/TestAdcModel.c