Browse Source

Improved StateConnection class

- renamed "getState" method
pcmattulat 3 years ago
parent
commit
b82750e044

+ 1 - 1
source/logic/StateConnection.cpp

@@ -19,7 +19,7 @@ ls_std::StateConnectionId ls_std::StateConnection::getConnectionId() {
   return this->connectionId;
 }
 
-ls_std::StateId ls_std::StateConnection::getState() {
+ls_std::StateId ls_std::StateConnection::getStateId() {
   return this->stateId;
 }
 

+ 1 - 1
source/logic/StateConnection.hpp

@@ -23,7 +23,7 @@ namespace ls_std {
       ~StateConnection() = default;
 
       StateConnectionId getConnectionId();
-      StateId getState();
+      StateId getStateId();
       bool isPassable();
       void updatePassCondition(bool _condition);
 

+ 1 - 1
test/cases/logic/StateConnectionTest.cpp

@@ -30,7 +30,7 @@ namespace {
   TEST_F(StateConnectionTest, getState)
   {
     ls_std::StateConnection connection {"AB", "B"};
-    ASSERT_STREQ("B", connection.getState().c_str());
+    ASSERT_STREQ("B", connection.getStateId().c_str());
   }
 
   TEST_F(StateConnectionTest, isPassable)