missed reply check in simple command nominal test case
This commit is contained in:
parent
103661facc
commit
ade36e65c6
@ -32,29 +32,31 @@ TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") {
|
|||||||
deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ);
|
deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ);
|
||||||
deviceHandlerCommander.performOperation();
|
deviceHandlerCommander.performOperation();
|
||||||
result = deviceHandlerCommander.getReplyReturnCode();
|
result = deviceHandlerCommander.getReplyReturnCode();
|
||||||
|
uint32_t missedReplies = deviceFdirMock.getMissedReplyCount();
|
||||||
|
REQUIRE(missedReplies == 0);
|
||||||
REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SECTION("Commanding missed reply") {
|
SECTION("Commanding missed reply") {
|
||||||
// comIF.setTestCase(ComIFMock::TestCase::MISSED_REPLY);
|
comIF.setTestCase(ComIFMock::TestCase::MISSED_REPLY);
|
||||||
// deviceHandlerCommander.resetReplyReturnCode();
|
deviceHandlerCommander.resetReplyReturnCode();
|
||||||
// // Set the timeout to 0 to immediately timeout the reply
|
// Set the timeout to 0 to immediately timeout the reply
|
||||||
// deviceHandlerMock.changeSimpleCommandReplyCountdown(0);
|
deviceHandlerMock.changeSimpleCommandReplyCountdown(0);
|
||||||
// result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK,
|
result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK,
|
||||||
// DeviceHandlerMock::SIMPLE_COMMAND);
|
DeviceHandlerMock::SIMPLE_COMMAND);
|
||||||
// REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
REQUIRE(result == HasReturnvaluesIF::RETURN_OK);
|
||||||
// deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
// deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE);
|
deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE);
|
||||||
// deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE);
|
deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE);
|
||||||
// deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ);
|
deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_READ);
|
||||||
// deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ);
|
deviceHandlerMock.performOperation(DeviceHandlerIF::GET_READ);
|
||||||
// deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
// deviceHandlerCommander.performOperation();
|
deviceHandlerCommander.performOperation();
|
||||||
// result = deviceHandlerCommander.getReplyReturnCode();
|
result = deviceHandlerCommander.getReplyReturnCode();
|
||||||
// REQUIRE(result == DeviceHandlerIF::TIMEOUT);
|
REQUIRE(result == DeviceHandlerIF::TIMEOUT);
|
||||||
// uint32_t missedReplies = deviceFdirMock.getMissedReplyCount();
|
uint32_t missedReplies = deviceFdirMock.getMissedReplyCount();
|
||||||
// REQUIRE(missedReplies == 1);
|
REQUIRE(missedReplies == 1);
|
||||||
// }
|
}
|
||||||
|
|
||||||
SECTION("Periodic reply nominal") {
|
SECTION("Periodic reply nominal") {
|
||||||
comIF.setTestCase(ComIFMock::TestCase::PERIODIC_REPLY_NOMINAL);
|
comIF.setTestCase(ComIFMock::TestCase::PERIODIC_REPLY_NOMINAL);
|
||||||
|
Loading…
Reference in New Issue
Block a user