diff options
author | Ira Lytvynenko <ILytvynenko@luxoft.com> | 2017-08-22 18:50:25 +0300 |
---|---|---|
committer | Ira Lytvynenko <ILytvynenko@luxoft.com> | 2017-08-22 18:50:25 +0300 |
commit | 787ba84ea541be522613eb09bfbaa6b0d4e46688 (patch) | |
tree | 2bff69b370a9ac3d459084574381ed78dce8309e /src | |
parent | ed87882cf04fc04d5cc2e18ffdcfe37c549c4433 (diff) | |
download | sdl_core-787ba84ea541be522613eb09bfbaa6b0d4e46688.tar.gz |
Fix UT after develop rebase
Diffstat (limited to 'src')
11 files changed, 12 insertions, 26 deletions
diff --git a/src/components/application_manager/test/commands/command_request_impl_test.cc b/src/components/application_manager/test/commands/command_request_impl_test.cc index 7f1e1955b7..1948608b9f 100644 --- a/src/components/application_manager/test/commands/command_request_impl_test.cc +++ b/src/components/application_manager/test/commands/command_request_impl_test.cc @@ -466,9 +466,6 @@ TEST_F(CommandRequestImplTest, SendResponse_SUCCESS) { EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)) .WillOnce(DoAll(SaveArg<0>(&result), Return(true))); - MockAppPtr mock_app; - EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app)); - // Args do not affect on anything in this case; command->SendResponse(true, kMobResultSuccess, NULL, NULL); @@ -499,9 +496,6 @@ TEST_F(CommandRequestImplTest, EXPECT_CALL(app_mngr_, ManageMobileCommand(_, _)) .WillOnce(DoAll(SaveArg<0>(&result), Return(true))); - MockAppPtr mock_app; - EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app)); - command->SendResponse(true, kMobResultSuccess, NULL, NULL); EXPECT_EQ(RequestState::kCompleted, command->current_state()); diff --git a/src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc b/src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc index bef00384a7..9617f91016 100644 --- a/src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/add_sub_menu_request_test.cc @@ -106,7 +106,7 @@ TEST_F(AddSubMenuRequestTest, OnEvent_UI_UNSUPPORTED_RESOURCE) { app_mngr_, ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL)) .WillOnce(DoAll(SaveArg<0>(&ui_command_result), Return(true))); - + command->Init(); command->on_event(event); EXPECT_EQ((*ui_command_result)[am::strings::msg_params][am::strings::success] diff --git a/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc b/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc index 036b0cfeb3..a6d9d8f50a 100644 --- a/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc +++ b/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc @@ -211,6 +211,7 @@ TEST_F(DeleteInteractionChoiceSetRequestTest, DeleteInteractionChoiceSetRequestPtr command = CreateCommand<DeleteInteractionChoiceSetRequest>(message_); + command->Init(); command->Run(); } @@ -247,6 +248,7 @@ TEST_F(DeleteInteractionChoiceSetRequestTest, Run_SendVrDeleteCommand_SUCCESS) { DeleteInteractionChoiceSetRequestPtr command = CreateCommand<DeleteInteractionChoiceSetRequest>(message_); + command->Init(); command->Run(); } diff --git a/src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc b/src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc index 82700cca5c..beff4c3584 100644 --- a/src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc +++ b/src/components/application_manager/test/commands/mobile/delete_sub_menu_test.cc @@ -289,6 +289,7 @@ TEST_F(DeleteSubMenuRequestTest, OnEvent_DeleteSubmenu_SUCCESS) { DeleteSubMenuRequestPtr command = CreateCommand<DeleteSubMenuRequest>(message_); + command->Init(); command->on_event(event); } diff --git a/src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc b/src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc index afdf5af3d2..60697446f2 100644 --- a/src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/diagnostic_message_request_test.cc @@ -189,9 +189,6 @@ TEST_F(DiagnosticMessageRequestTest, OnEvent_SUCCESS) { app_mngr_, ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _)); - MockAppPtr app(CreateMockApp()); - EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(app)); - command->on_event(event); } diff --git a/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc b/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc index 822643b8c8..dfa38a758b 100644 --- a/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc @@ -68,10 +68,10 @@ typedef SharedPtr<GetDTCsRequest> GetDTCsRequestPtr; class GetDTCsRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> { -public: - GetDTCsRequestTest():CommandRequestTest<CommandsTestMocks::kIsNice>() { - Mock::VerifyAndClearExpectations(message_helper_mock_); - } + public: + GetDTCsRequestTest() : CommandRequestTest<CommandsTestMocks::kIsNice>() { + Mock::VerifyAndClearExpectations(message_helper_mock_); + } }; TEST_F(GetDTCsRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) { diff --git a/src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc b/src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc index 0291de6258..e133ec9119 100644 --- a/src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc +++ b/src/components/application_manager/test/commands/mobile/reset_global_properties_test.cc @@ -383,11 +383,6 @@ TEST_F(ResetGlobalPropertiesRequestTest, OnEvent_InvalidApp_NoHashUpdate) { EXPECT_CALL(*mock_message_helper_, CreateAppVrHelp(_)) .WillOnce(Return(vr_help)); - MockAppPtr invalid_app; - EXPECT_CALL(app_mngr_, application(kConnectionKey)) - .WillOnce(Return(mock_app_)) - .WillOnce(Return(invalid_app)); - EXPECT_CALL(*mock_app_, UpdateHash()).Times(0); ResetGlobalPropertiesRequestPtr command = 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 66cd740bbe..4546293172 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 @@ -83,6 +83,7 @@ TEST_F(SubscribeWayPointsRequestTest, Run_SUCCESS) { EXPECT_CALL(*app, UpdateHash()); } + command->Init(); MessageSharedPtr mobile_result_msg( CatchMobileCommandResult(CallRun(*command))); @@ -120,6 +121,7 @@ TEST_F(SubscribeWayPointsRequestTest, OnEvent_SUCCESS) { EXPECT_CALL(*app, UpdateHash()); } + command->Init(); command->on_event(event); Mock::VerifyAndClearExpectations(mock_message_helper); diff --git a/src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc b/src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc index 4cbf98c5e1..46a1ce02eb 100644 --- a/src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/unsubscribe_button_request_test.cc @@ -145,7 +145,7 @@ TEST_F(UnsubscribeButtonRequestTest, Run_SUCCESS) { ManageMobileCommand(MobileResultCodeIs(mobile_result::SUCCESS), _)); EXPECT_CALL(*mock_app, UpdateHash()); - + command->Init(); command->Run(); } diff --git a/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc b/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc index 6f88f249c4..9652364646 100644 --- a/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/unsubscribe_vehicle_request_test.cc @@ -235,6 +235,7 @@ TEST_F(UnsubscribeVehicleRequestTest, OnEvent_DataNotSubscribed_IGNORED) { EXPECT_CALL( app_mngr_, ManageMobileCommand(MobileResultCodeIs(mobile_result::IGNORED), _)); + command->Init(); command->Run(); am::event_engine::Event test_event( diff --git a/src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc b/src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc index 6b363f6aca..cab67e641c 100644 --- a/src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/update_turn_list_request_test.cc @@ -281,9 +281,6 @@ TEST_F(UpdateTurnListRequestTest, OnEvent_UnsupportedResource_SUCCESS) { EXPECT_CALL(app_mngr_, ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _)); - MockAppPtr mock_app(CreateMockApp()); - EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app)); - command_->on_event(event); } @@ -306,9 +303,6 @@ TEST_F(UpdateTurnListRequestTest, EXPECT_CALL(app_mngr_, ManageMobileCommand(MobileResultCodeIs(mobile_response_code), _)); - MockAppPtr mock_app(CreateMockApp()); - EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app)); - command_->on_event(event); } |