fixed DHB unittest for new Actions
This commit is contained in:
@ -23,7 +23,7 @@ TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") {
|
||||
SECTION("Commanding nominal") {
|
||||
comIF.setTestCase(ComIFMock::TestCase::SIMPLE_COMMAND_NOMINAL);
|
||||
result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK,
|
||||
DeviceHandlerMock::SIMPLE_COMMAND);
|
||||
static_cast<uint32_t>(MockCommands::SIMPLE_COMMAND));
|
||||
REQUIRE(result == returnvalue::OK);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE);
|
||||
@ -43,7 +43,7 @@ TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") {
|
||||
// Set the timeout to 0 to immediately timeout the reply
|
||||
deviceHandlerMock.changeSimpleCommandReplyCountdown(0);
|
||||
result = deviceHandlerCommander.sendCommand(objects::DEVICE_HANDLER_MOCK,
|
||||
DeviceHandlerMock::SIMPLE_COMMAND);
|
||||
static_cast<uint32_t>(MockCommands::SIMPLE_COMMAND));
|
||||
REQUIRE(result == returnvalue::OK);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE);
|
||||
@ -60,7 +60,7 @@ TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") {
|
||||
|
||||
SECTION("Periodic reply nominal") {
|
||||
comIF.setTestCase(ComIFMock::TestCase::PERIODIC_REPLY_NOMINAL);
|
||||
deviceHandlerMock.enablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY);
|
||||
deviceHandlerMock.enablePeriodicReply(static_cast<uint32_t>(MockCommands::PERIODIC_REPLY));
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE);
|
||||
@ -73,7 +73,7 @@ TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") {
|
||||
comIF.setTestCase(ComIFMock::TestCase::MISSED_REPLY);
|
||||
// Set the timeout to 0 to immediately timeout the reply
|
||||
deviceHandlerMock.changePeriodicReplyCountdown(0);
|
||||
deviceHandlerMock.enablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY);
|
||||
deviceHandlerMock.enablePeriodicReply(static_cast<uint32_t>(MockCommands::PERIODIC_REPLY));
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE);
|
||||
@ -82,7 +82,7 @@ TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") {
|
||||
uint32_t missedReplies = deviceFdirMock.getMissedReplyCount();
|
||||
REQUIRE(missedReplies == 1);
|
||||
// Test if disabling of periodic reply
|
||||
deviceHandlerMock.disablePeriodicReply(DeviceHandlerMock::PERIODIC_REPLY);
|
||||
deviceHandlerMock.disablePeriodicReply(static_cast<uint32_t>(MockCommands::PERIODIC_REPLY));
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::PERFORM_OPERATION);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::SEND_WRITE);
|
||||
deviceHandlerMock.performOperation(DeviceHandlerIF::GET_WRITE);
|
||||
|
Reference in New Issue
Block a user