|
@@ -23,27 +23,25 @@ namespace {
|
|
|
|
|
|
TEST_F(StateConnectionTest, getConnectionId)
|
|
TEST_F(StateConnectionTest, getConnectionId)
|
|
{
|
|
{
|
|
- ls_std::StateConnection connection {"AB", std::make_shared<ls_std::State>("B")};
|
|
|
|
|
|
+ ls_std::StateConnection connection {"AB", "B"};
|
|
ASSERT_STREQ("AB", connection.getConnectionId().c_str());
|
|
ASSERT_STREQ("AB", connection.getConnectionId().c_str());
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(StateConnectionTest, getState)
|
|
TEST_F(StateConnectionTest, getState)
|
|
{
|
|
{
|
|
- ls_std::StateConnection connection {"AB", std::make_shared<ls_std::State>("B")};
|
|
|
|
-
|
|
|
|
- ASSERT_TRUE(connection.getState() != nullptr);
|
|
|
|
- ASSERT_STREQ("B", connection.getState()->getId().c_str());
|
|
|
|
|
|
+ ls_std::StateConnection connection {"AB", "B"};
|
|
|
|
+ ASSERT_STREQ("B", connection.getState().c_str());
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(StateConnectionTest, isPassable)
|
|
TEST_F(StateConnectionTest, isPassable)
|
|
{
|
|
{
|
|
- ls_std::StateConnection connection {"AB", std::make_shared<ls_std::State>("B")};
|
|
|
|
|
|
+ ls_std::StateConnection connection {"AB", "B"};
|
|
ASSERT_FALSE(connection.isPassable());
|
|
ASSERT_FALSE(connection.isPassable());
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(StateConnectionTest, updatePassCondition)
|
|
TEST_F(StateConnectionTest, updatePassCondition)
|
|
{
|
|
{
|
|
- ls_std::StateConnection connection {"AB", std::make_shared<ls_std::State>("B")};
|
|
|
|
|
|
+ ls_std::StateConnection connection {"AB", "B"};
|
|
|
|
|
|
ASSERT_FALSE(connection.isPassable());
|
|
ASSERT_FALSE(connection.isPassable());
|
|
connection.updatePassCondition(true);
|
|
connection.updatePassCondition(true);
|