diff --git a/inc/ErrorHandler.hpp b/inc/ErrorHandler.hpp index 4d62938f761363c6f90379a2ae17523ba2de7c84..eac15f5c7ce530531808ca2af377ae9885aa2696 100644 --- a/inc/ErrorHandler.hpp +++ b/inc/ErrorHandler.hpp @@ -111,11 +111,10 @@ public: enum ExecutionStartErrorType { UnknownExecutionStartError = 0, /** - * EventAction refers to the service, EventActionIDefinitionID refers to the variable * In the Event Action Service, in the addEventActionDefinition function an attempt was * made to add an event Action Definition with an eventActionDefinitionID that exists */ - EventActionEventActionDefinitionIDExistsError = 1, + EventActionDefinitionIDExistsError = 1, /** * In the Event Action Service, in the deleteEventActionDefinition function, an attempt * was made to delete an event action definition that was enabled @@ -126,13 +125,14 @@ public: * action definition */ EventActionUnknownEventDefinitionError = 3, - SubServiceExecutionStartError = 4, - InstructionExecutionStartError = 5, /** * EventAction refers to the service, EventActionIDefinitionID refers to the variable * In the Event Action Service, an access attempt was made to an unknown eventActionDefinitionID */ - EventActionUnknownEventActionDefinitionIDError = 6, + EventActionUnknownEventActionDefinitionIDError = 4, + SubServiceExecutionStartError = 5, + InstructionExecutionStartError = 6, + }; /** diff --git a/src/Services/EventActionService.cpp b/src/Services/EventActionService.cpp index 9aee53f1784d6d27ea6bf4dc36f6065b21918d14..7edb1c6bce0847d112855362dc269e0200d07aea 100644 --- a/src/Services/EventActionService.cpp +++ b/src/Services/EventActionService.cpp @@ -15,7 +15,7 @@ void EventActionService::addEventActionDefinitions(Message& message) { for (auto& element = range.first; element != range.second; ++element) { if (element->second.eventActionDefinitionID == eventActionDefinitionID) { canBeAdded = false; - ErrorHandler::reportError(message, ErrorHandler::EventActionEventActionDefinitionIDExistsError); + ErrorHandler::reportError(message, ErrorHandler::EventActionDefinitionIDExistsError); } } } diff --git a/test/Services/EventActionService.cpp b/test/Services/EventActionService.cpp index 1ba23a7c65ccf245700ea2888bf19615d3274f2d..cacbe5d4d8c256dd79aa1c70886f64cb03f627b9 100644 --- a/test/Services/EventActionService.cpp +++ b/test/Services/EventActionService.cpp @@ -60,7 +60,7 @@ TEST_CASE("Add event-action definitions TC[19,1]", "[service][st19]") { data = "456"; message3.appendString(data); eventActionService.addEventActionDefinitions(message3); - CHECK(ServiceTests::thrownError(ErrorHandler::EventActionEventActionDefinitionIDExistsError)); + CHECK(ServiceTests::thrownError(ErrorHandler::EventActionDefinitionIDExistsError)); CHECK(ServiceTests::countErrors() == 2); } @@ -401,7 +401,7 @@ TEST_CASE("Enable event-action function TC[19,8]", "[service][st19]") { Message message(19, 8, Message::TC, 0); eventActionService.enableEventActionFunction(message); - CHECK(eventActionService.getEventActionFunctionStatus() == true); + CHECK(eventActionService.getEventActionFunctionStatus()); } TEST_CASE("Disable event-action function TC[19,9]", "[service][st19]") { @@ -410,7 +410,7 @@ TEST_CASE("Disable event-action function TC[19,9]", "[service][st19]") { Message message(19, 9, Message::TC, 0); eventActionService.disableEventActionFunction(message); - CHECK(eventActionService.getEventActionFunctionStatus() == false); + CHECK(eventActionService.getEventActionFunctionStatus()); } TEST_CASE("Execute a TC request", "[service][st19]"){