summaryrefslogtreecommitdiff
path: root/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc')
-rw-r--r--src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc31
1 files changed, 10 insertions, 21 deletions
diff --git a/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc b/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc
index 50567a7c62..5615b0cabd 100644
--- a/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc
+++ b/src/components/application_manager/test/commands/mobile/unsubscribe_way_points_request_test.cc
@@ -72,20 +72,13 @@ class UnSubscribeWayPointsRequestTest
public:
UnSubscribeWayPointsRequestTest()
: command_msg_(CreateMessage(smart_objects::SmartType_Map))
- , command_(CreateCommand<UnSubscribeWayPointsRequest>(command_msg_))
- , mock_message_helper_(*am::MockMessageHelper::message_helper_mock()) {
+ , command_(CreateCommand<UnSubscribeWayPointsRequest>(command_msg_)) {
(*command_msg_)[am::strings::params][am::strings::connection_key] =
kConnectionKey;
- testing::Mock::VerifyAndClearExpectations(&mock_message_helper_);
- }
-
- ~UnSubscribeWayPointsRequestTest() {
- testing::Mock::VerifyAndClearExpectations(&mock_message_helper_);
}
MessageSharedPtr command_msg_;
::utils::SharedPtr<UnSubscribeWayPointsRequest> command_;
- am::MockMessageHelper& mock_message_helper_;
};
TEST_F(UnSubscribeWayPointsRequestTest,
@@ -107,9 +100,9 @@ TEST_F(UnSubscribeWayPointsRequestTest,
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(app_mngr_, IsAppSubscribedForWayPoints(kAppId))
+ EXPECT_CALL(app_mngr_,
+ IsAppSubscribedForWayPoints(
+ ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
.WillOnce(Return(false));
EXPECT_CALL(
@@ -124,9 +117,9 @@ TEST_F(UnSubscribeWayPointsRequestTest, Run_AppSubscribedForWayPoints_SUCCESS) {
EXPECT_CALL(app_mngr_, application(kConnectionKey))
.WillOnce(Return(mock_app));
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(app_mngr_, IsAppSubscribedForWayPoints(kAppId))
+ EXPECT_CALL(app_mngr_,
+ IsAppSubscribedForWayPoints(
+ ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)))
.WillOnce(Return(true));
EXPECT_CALL(app_mngr_,
@@ -161,13 +154,9 @@ TEST_F(UnSubscribeWayPointsRequestTest,
Event event(hmi_apis::FunctionID::Navigation_UnsubscribeWayPoints);
event.set_smart_object(*event_msg);
- EXPECT_CALL(*mock_app, app_id()).WillOnce(Return(kAppId));
-
- EXPECT_CALL(app_mngr_, UnsubscribeAppFromWayPoints(kAppId));
-
- EXPECT_CALL(mock_message_helper_,
- HMIToMobileResult(hmi_apis::Common_Result::SUCCESS))
- .WillOnce(Return(mobile_apis::Result::SUCCESS));
+ EXPECT_CALL(app_mngr_,
+ UnsubscribeAppFromWayPoints(
+ ::testing::Matcher<am::ApplicationSharedPtr>(mock_app)));
EXPECT_CALL(
app_mngr_,