From 18fddf27556e0b7da229e3441ae6b5bb25356a42 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 25 Jan 2021 15:06:41 +0100 Subject: [PATCH] tested subscription interface --- unittest/tests/datapoollocal/LocalPoolManagerTest.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/unittest/tests/datapoollocal/LocalPoolManagerTest.cpp b/unittest/tests/datapoollocal/LocalPoolManagerTest.cpp index b12d484f..81e2fddc 100644 --- a/unittest/tests/datapoollocal/LocalPoolManagerTest.cpp +++ b/unittest/tests/datapoollocal/LocalPoolManagerTest.cpp @@ -138,6 +138,10 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") { } SECTION("AdvancedTests") { + /* Acquire subscription interface */ + ProvidesDataPoolSubscriptionIF* subscriptionIF = poolOwner->getSubscriptionInterface(); + REQUIRE(subscriptionIF != nullptr); + /* Subscribe for variable update */ REQUIRE(poolOwner->subscribeWrapperVariableUpdate(lpool::uint8VarId) == retval::CATCH_OK); @@ -155,8 +159,9 @@ TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") { REQUIRE(mqMock->receiveMessage(&messageSent) == retval::CATCH_OK); CHECK(messageSent.getCommand() == static_cast( HousekeepingMessage::UPDATE_NOTIFICATION_VARIABLE)); - /* Now subscribe for the dataset update (HK and update) again */ - REQUIRE(poolOwner->subscribeWrapperSetUpdate() == retval::CATCH_OK); + /* Now subscribe for the dataset update (HK and update) again with subscription interface */ + REQUIRE(subscriptionIF->subscribeForSetUpdateMessages(lpool::testSetId, + objects::NO_OBJECT, objects::HK_RECEIVER_MOCK, false) == retval::CATCH_OK); REQUIRE(poolOwner->subscribeWrapperSetUpdateHk() == retval::CATCH_OK); poolOwner->dataset.setChanged(true);