Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1640 Update PolymorphicHandler tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Killat <[email protected]>
  • Loading branch information
MatthiasKillat committed Sep 20, 2022
1 parent 9042024 commit 3ca98f6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions iceoryx_hoofs/test/moduletests/test_polymorphic_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ class PolymorphicHandler_test : public Test

TEST_F(PolymorphicHandler_test, handlerIsInitializedWithDefault)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "41bb4a5e-a916-4a6d-80c4-fed3a3d8d78b");
auto& handler = Handler::get();

EXPECT_EQ(handler.id(), DEFAULT_ID);
}

TEST_F(PolymorphicHandler_test, settingAlternateWorks)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "8b2f0cfe-f13c-4fa0-aa93-5ddd4f0904d1");
Handler::set(alternateHandler());
auto& handler = Handler::get();

Expand All @@ -95,7 +95,7 @@ TEST_F(PolymorphicHandler_test, settingAlternateWorks)

TEST_F(PolymorphicHandler_test, alternatePointsToExternalMemory)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "85ce0e51-a1fe-490c-9012-7d539512ed38");
Handler::set(alternateHandler());

auto& handler = Handler::get();
Expand All @@ -106,7 +106,7 @@ TEST_F(PolymorphicHandler_test, alternatePointsToExternalMemory)

TEST_F(PolymorphicHandler_test, explicitlySettingToDefaultWorks)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "32e4d808-c848-4bf9-b878-e163ca825539");
Handler::set(alternateHandler());
Handler::set(defaultHandler());

Expand All @@ -118,7 +118,7 @@ TEST_F(PolymorphicHandler_test, explicitlySettingToDefaultWorks)

TEST_F(PolymorphicHandler_test, resetToDefaultWorks)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "ef8a99da-22a6-497e-b2ec-bf72cc3ae943");
Handler::set(alternateHandler());
Handler::reset();

Expand All @@ -128,7 +128,7 @@ TEST_F(PolymorphicHandler_test, resetToDefaultWorks)

TEST_F(PolymorphicHandler_test, settingAfterFinalizeTerminates)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "171ac802-01b9-4e08-80a6-6f2defecaf6d");

auto f = [&]() {
Handler::finalize();
Expand All @@ -140,7 +140,7 @@ TEST_F(PolymorphicHandler_test, settingAfterFinalizeTerminates)

TEST_F(PolymorphicHandler_test, resetAfterFinalizeTerminates)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "996220e3-7985-4d57-bd3f-844987cf99dc");

auto f = [&]() {
Handler::finalize();
Expand Down Expand Up @@ -172,36 +172,36 @@ class Activatable_test : public Test

TEST_F(Activatable_test, isActiveAfterConstruction)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "874b600a-7976-4c97-a800-55bac11c4eaa");
EXPECT_TRUE(sut.isActive());
}

TEST_F(Activatable_test, isNotActiveAfterDeactivate)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "b9f052b1-33dd-4e71-9887-26581d219492");
sut.deactivate();
EXPECT_FALSE(sut.isActive());
}

TEST_F(Activatable_test, isNotActiveAfterMultiDeactivate)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "8ab19dd3-83a4-4e95-a4d2-3c9d973ab28b");
sut.deactivate();
sut.deactivate();
EXPECT_FALSE(sut.isActive());
}

TEST_F(Activatable_test, isActiveAfterReactivation)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "ec26ea62-d979-4f28-89a2-59d4639b52b2");
sut.deactivate();
sut.activate();
EXPECT_TRUE(sut.isActive());
}

TEST_F(Activatable_test, isActiveAfterMultiActivation)
{
::testing::Test::RecordProperty("TEST_ID", "123");
::testing::Test::RecordProperty("TEST_ID", "5593d002-394b-4e30-908c-d56d9b56c58e");
sut.activate();
EXPECT_TRUE(sut.isActive());

Expand Down

0 comments on commit 3ca98f6

Please sign in to comment.