58 #include "Mockdatabase.h"
59 #include "Mockdatabase_helper.h"
62 #include "Mockplausibility.h"
78 DATA_Read4DataBlocks_ExpectAndReturn(
84 DATA_Read4DataBlocks_IgnoreArg_pDataToReceiver0();
85 DATA_Read4DataBlocks_IgnoreArg_pDataToReceiver1();
86 DATA_Read4DataBlocks_IgnoreArg_pDataToReceiver2();
87 DATA_Read4DataBlocks_IgnoreArg_pDataToReceiver3();
110 uint32_t timestamp = 10u;
111 uint32_t previousTimestamp = 0u;
116 previousTimestamp = 10u;
121 previousTimestamp = 60u;
126 previousTimestamp = 0u;
132 uint32_t timeDifference = 100u;
135 uint32_t timestamp = 50u;
136 uint32_t previousTimestamp = 0u;
137 OS_GetTickCount_ExpectAndReturn(100u);
142 OS_GetTickCount_ExpectAndReturn(100u);
147 OS_GetTickCount_ExpectAndReturn(101u);
152 OS_GetTickCount_ExpectAndReturn(5000u);
156 timestamp = UINT32_MAX;
157 OS_GetTickCount_ExpectAndReturn(50u);
161 timestamp = UINT32_MAX - 50u;
162 OS_GetTickCount_ExpectAndReturn(49u);
166 timestamp = UINT32_MAX - 50u;
167 OS_GetTickCount_ExpectAndReturn(50u);
172 OS_GetTickCount_ExpectAndReturn(UINT32_MAX);
222 DATA_EntryUpdatedWithinInterval_IgnoreAndReturn(
false);
223 DATA_DatabaseEntryUpdatedAtLeastOnce_IgnoreAndReturn(
false);
226 OS_GetTickCount_IgnoreAndReturn(0);
228 DIAG_Handler_IgnoreAndReturn(
STD_OK);
@ DATA_BLOCK_ID_CELL_VOLTAGE_REDUNDANCY0
@ DATA_BLOCK_ID_CELL_VOLTAGE
@ DATA_BLOCK_ID_CELL_TEMPERATURE_REDUNDANCY0
@ DATA_BLOCK_ID_CELL_TEMPERATURE_BASE
@ DATA_BLOCK_ID_CELL_VOLTAGE_BASE
@ DATA_BLOCK_ID_CELL_TEMPERATURE
math library for often used math functions
#define NULL_PTR
Null pointer.
STD_RETURN_TYPE_e TEST_MRC_CalculateCellTemperatureMinMaxAverage(DATA_BLOCK_CELL_TEMPERATURE_s *pValidatedTemperatures, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
STD_RETURN_TYPE_e TEST_MRC_CalculateCellVoltageMinMaxAverage(DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages, DATA_BLOCK_MIN_MAX_s *pMinMaxAverageValues)
STD_RETURN_TYPE_e TEST_MRC_UpdateCellTemperatureValidation(DATA_BLOCK_CELL_TEMPERATURE_s *pCellTemperature, DATA_BLOCK_CELL_TEMPERATURE_s *pValidatedTemperature)
bool TEST_MRC_MeasurementUpdatedAtLeastOnce(uint32_t timestamp, uint32_t previousTimestamp)
STD_RETURN_TYPE_e MRC_ValidateAfeMeasurement(void)
Function to validate the measurement between redundant measurement values for cell voltage and cell t...
STD_RETURN_TYPE_e TEST_MRC_ValidateCellTemperature(DATA_BLOCK_CELL_TEMPERATURE_s *pCelltemperatureBase, DATA_BLOCK_CELL_TEMPERATURE_s *pCelltemperatureRedundancy0, DATA_BLOCK_CELL_TEMPERATURE_s *pValidatedTemperatures)
STD_RETURN_TYPE_e TEST_MRC_UpdateCellVoltageValidation(DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltage, DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages)
STD_RETURN_TYPE_e TEST_MRC_MeasurementUpdatedRecently(uint32_t timestamp, uint32_t previousTimestamp, uint32_t timeInterval)
STD_RETURN_TYPE_e TEST_MRC_ValidateCellVoltage(DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltageBase, DATA_BLOCK_CELL_VOLTAGE_s *pCellVoltageRedundancy0, DATA_BLOCK_CELL_VOLTAGE_s *pValidatedVoltages)
Header fileS for handling redundancy between redundant cell voltage and cell temperature measurements...
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
#define TEST_ASSERT_PASS_ASSERT(_code_under_test)
assert whether assert macro has passed
#define TEST_ASSERT_FAIL_ASSERT(_code_under_test)
assert whether assert macro has failed
void testMRC_UpdateCellVoltageValidationNullPointer(void)
DATA_BLOCK_CELL_VOLTAGE_s testCellVoltageRedundancy0
void testMRC_CalculateCellVoltageMinMaxAverageNullPointer(void)
DATA_BLOCK_CELL_VOLTAGE_s testCellVoltageBase
void testMRC_CalculateCellTemperatureMinMaxAverageNullPointer(void)
void testMRC_ValidateCellVoltageNullPointer(void)
DATA_BLOCK_CELL_TEMPERATURE_s testCellTemperatureBase
void testMRC_ValidateCellTemperatureNullPointer(void)
void testMRC_MeasurementUpdatedAtLeastOnce(void)
void testMRC_MeasurementUpdatedRecently(void)
void testMRC_AfeMeasurementValidationTickZeroNothingToDo(void)
void testMRC_UpdateCellTemperatureValidationNullPointer(void)
DATA_BLOCK_CELL_TEMPERATURE_s testCellTemperatureRedundancy0
static void injectDatabaseEntries(void)