diff options
Diffstat (limited to 'src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc')
-rw-r--r-- | src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc b/src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc index 4546293172..87127231be 100644 --- a/src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/subscribe_way_points_request_test.cc @@ -51,16 +51,15 @@ namespace mobile_commands_test { namespace subscribe_way_points_request { using ::testing::_; +using ::testing::A; using ::testing::Return; using ::testing::ReturnRef; using ::testing::DoAll; using ::testing::SaveArg; using ::testing::InSequence; -using ::testing::Mock; namespace am = ::application_manager; using am::commands::SubscribeWayPointsRequest; using am::commands::MessageSharedPtr; -using am::MockMessageHelper; typedef SharedPtr<SubscribeWayPointsRequest> CommandPtr; @@ -72,14 +71,15 @@ TEST_F(SubscribeWayPointsRequestTest, Run_SUCCESS) { MockAppPtr app(CreateMockApp()); ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app)); - ON_CALL(app_mngr_, IsAppSubscribedForWayPoints(_)) + ON_CALL(app_mngr_, IsAppSubscribedForWayPoints(A<am::ApplicationSharedPtr>())) .WillByDefault(Return(false)); ON_CALL(app_mngr_, IsAnyAppSubscribedForWayPoints()) .WillByDefault(Return(true)); { InSequence dummy; - EXPECT_CALL(app_mngr_, SubscribeAppForWayPoints(_)); + EXPECT_CALL(app_mngr_, + SubscribeAppForWayPoints(A<am::ApplicationSharedPtr>())); EXPECT_CALL(*app, UpdateHash()); } @@ -106,16 +106,13 @@ TEST_F(SubscribeWayPointsRequestTest, OnEvent_SUCCESS) { event.set_smart_object(*event_msg); - MockMessageHelper* mock_message_helper = - MockMessageHelper::message_helper_mock(); - Mock::VerifyAndClearExpectations(mock_message_helper); - ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app)); { InSequence dummy; - EXPECT_CALL(app_mngr_, SubscribeAppForWayPoints(_)); - EXPECT_CALL(*mock_message_helper, HMIToMobileResult(result_code)) + EXPECT_CALL(app_mngr_, + SubscribeAppForWayPoints(A<am::ApplicationSharedPtr>())); + EXPECT_CALL(mock_message_helper_, HMIToMobileResult(result_code)) .WillOnce(Return(mobile_apis::Result::SUCCESS)); EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)); EXPECT_CALL(*app, UpdateHash()); @@ -123,8 +120,6 @@ TEST_F(SubscribeWayPointsRequestTest, OnEvent_SUCCESS) { command->Init(); command->on_event(event); - - Mock::VerifyAndClearExpectations(mock_message_helper); } } // namespace subscribe_way_points_request |