diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc index f39ccf7be3..e849866c1a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/set_global_properties_test.cc @@ -58,7 +58,7 @@ using am::commands::MessageSharedPtr; using am::MockMessageHelper; using am::CommandsMap; using utils::custom_string::CustomString; -using ::utils::SharedPtr; + using ::testing::_; using ::testing::Return; using ::testing::ReturnRef; @@ -127,7 +127,7 @@ class SetGlobalPropertiesRequestTest } void OnEventUISetupHelper(MessageSharedPtr msg, - SharedPtr<SetGlobalPropertiesRequest> command) { + std::shared_ptr<SetGlobalPropertiesRequest> command) { SmartObject vr_help_title("yes"); SmartObject vr_help_array(smart_objects::SmartType_Array); VRArraySetupHelper(msg, vr_help_title, vr_help_array); @@ -154,7 +154,7 @@ class SetGlobalPropertiesRequestTest } void OnEventTTSSetupHelper(MessageSharedPtr msg, - SharedPtr<SetGlobalPropertiesRequest> command) { + std::shared_ptr<SetGlobalPropertiesRequest> command) { SmartObject help_prompt(smart_objects::SmartType_Array); help_prompt[0][am::strings::text] = "Help_Prompt_One"; (*msg)[am::strings::msg_params][am::strings::help_prompt] = help_prompt; @@ -275,7 +275,7 @@ TEST_F(SetGlobalPropertiesRequestTest, (*msg_vr)[am::strings::msg_params][am::strings::vr_commands][0] = "vr_command"; - utils::SharedPtr<SetGlobalPropertiesRequest> command = + std::shared_ptr<SetGlobalPropertiesRequest> command = CreateCommand<SetGlobalPropertiesRequest>(msg_vr); EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey)); @@ -360,7 +360,7 @@ TEST_F(SetGlobalPropertiesRequestTest, OnEvent_SUCCESS_Expect_MessageNotSend) { am::event_engine::Event event(hmi_apis::FunctionID::TTS_SetGlobalProperties); event.set_smart_object(*response); - utils::SharedPtr<SetGlobalPropertiesRequest> command = + std::shared_ptr<SetGlobalPropertiesRequest> command = CreateCommand<SetGlobalPropertiesRequest>(response); MockAppPtr mock_app(CreateMockApp()); @@ -393,7 +393,7 @@ TEST_F(SetGlobalPropertiesRequestTest, am::event_engine::Event event_ui( hmi_apis::FunctionID::UI_SetGlobalProperties); event_tts.set_smart_object(*response); - utils::SharedPtr<SetGlobalPropertiesRequest> command = + std::shared_ptr<SetGlobalPropertiesRequest> command = CreateCommand<SetGlobalPropertiesRequest>(response); EXPECT_CALL(mock_hmi_interfaces_, GetInterfaceState(_)) @@ -427,7 +427,7 @@ TEST_F(SetGlobalPropertiesRequestTest, TEST_F(SetGlobalPropertiesRequestTest, Run_VRNoMenuAndKeyboard_SUCCESS) { MessageSharedPtr msg = CreateMsgParams(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); EXPECT_CALL( mock_hmi_interfaces_, @@ -484,7 +484,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_VRWithMenuAndKeyboard_SUCCESS) { EXPECT_CALL(*mock_help_prompt_manager_, OnSetGlobalPropertiesReceived(_, false)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -506,7 +506,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_VRBrokenMenuIcon_Canceled) { EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -528,7 +528,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_VRBrokenVRHelp_Canceled) { EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -552,7 +552,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_VRIncorrectSyntax_Canceled) { EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(_)).Times(0); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -573,7 +573,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_VRMissingTitle_Canceled) { EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey)); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -590,7 +590,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_VRMissingArray_Canceled) { EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey)); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -611,7 +611,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_VRWrongOrder_Canceled) { EXPECT_CALL(app_mngr_, RemoveAppFromTTSGlobalPropertiesList(kConnectionKey)); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -642,7 +642,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_NoVR_SUCCESS) { GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI)) .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -671,7 +671,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_NoVRNoDataNoDefault_Canceled) { GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI)) .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -699,7 +699,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_NoVRNoDataDefaultCreated_SUCCESS) { GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI)) .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -741,7 +741,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_TTSHelpAndTimeout_SUCCESS) { EXPECT_CALL(*mock_help_prompt_manager_, OnSetGlobalPropertiesReceived(_, false)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -775,7 +775,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_TTSOnlyHelp_SUCCESS) { .WillOnce(ReturnRef(*mock_help_prompt_manager_.get())); EXPECT_CALL(*mock_help_prompt_manager_, OnSetGlobalPropertiesReceived(_, false)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -809,7 +809,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_TTSOnlyTimeout_SUCCESS) { .WillOnce(ReturnRef(*mock_help_prompt_manager_.get())); EXPECT_CALL(*mock_help_prompt_manager_, OnSetGlobalPropertiesReceived(_, false)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -826,7 +826,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_TTSIncorrectSyntax_Canceled) { EXPECT_CALL(mock_message_helper_, VerifyImageVrHelpItems(_, _, _)).Times(0); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -842,7 +842,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidHelpPromptText_INVALID_DATA) { ExpectVerifyImageVrHelpUnsuccess(); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ExpectInvalidData(); @@ -860,7 +860,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidVrHelpText_INVALID_DATA) { ExpectVerifyImageVrHelpSuccess(vr_help); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ExpectInvalidData(); @@ -879,7 +879,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidImageValue_INVALID_DATA) { ExpectVerifyImageVrHelpSuccess(vr_help); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ExpectInvalidData(); @@ -897,7 +897,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidMenuIcon_INVALID_DATA) { ExpectVerifyImageSuccess(menu_icon); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ExpectInvalidData(); @@ -914,7 +914,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidMenuTitle_INVALID_DATA) { ExpectVerifyImageVrHelpUnsuccess(); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ExpectInvalidData(); @@ -934,7 +934,7 @@ TEST_F(SetGlobalPropertiesRequestTest, ExpectVerifyImageVrHelpUnsuccess(); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ExpectInvalidData(); @@ -954,7 +954,7 @@ TEST_F(SetGlobalPropertiesRequestTest, ExpectVerifyImageVrHelpUnsuccess(); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ExpectInvalidData(); @@ -968,7 +968,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_NoData_Canceled) { ExpectVerifyImageVrHelpUnsuccess(); EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -982,7 +982,7 @@ TEST_F(SetGlobalPropertiesRequestTest, Run_InvalidApp_Canceled) { EmptyExpectationsSetupHelper(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); command->Run(); @@ -994,7 +994,7 @@ TEST_F(SetGlobalPropertiesRequestTest, OnEvent_PendingRequest_UNSUCCESS) { hmi_apis::Common_Result::SUCCESS; (*msg)[am::strings::params][am::hmi_response::code] = response_code; - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); Event event(hmi_apis::FunctionID::UI_SetGlobalProperties); @@ -1022,7 +1022,7 @@ TEST_F(SetGlobalPropertiesRequestTest, OnEvent_UIAndSuccessResultCode_SUCCESS) { GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI)) .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); OnEventUISetupHelper(msg, command); @@ -1050,7 +1050,7 @@ TEST_F(SetGlobalPropertiesRequestTest, OnEvent_UIAndWarningResultCode_SUCCESS) { hmi_apis::Common_Result::WARNINGS; (*msg)[am::strings::params][am::hmi_response::code] = response_code; - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); ON_CALL( mock_hmi_interfaces_, @@ -1090,7 +1090,7 @@ TEST_F(SetGlobalPropertiesRequestTest, OnEvent_InvalidApp_Canceled) { ON_CALL(mock_hmi_interfaces_, GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI)) .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); OnEventUISetupHelper(msg, command); @@ -1111,7 +1111,7 @@ TEST_F(SetGlobalPropertiesRequestTest, OnEvent_InvalidApp_Canceled) { TEST_F(SetGlobalPropertiesRequestTest, OnEvent_InvalidEventID_Canceled) { MessageSharedPtr msg = CreateMessage(); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); EXPECT_CALL(app_mngr_, application(_)).WillOnce(Return(mock_app_)); @@ -1136,7 +1136,7 @@ TEST_F(SetGlobalPropertiesRequestTest, ON_CALL(mock_hmi_interfaces_, GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS)) .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); OnEventTTSSetupHelper(msg, command); @@ -1170,7 +1170,7 @@ TEST_F(SetGlobalPropertiesRequestTest, ON_CALL(mock_hmi_interfaces_, GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS)) .WillByDefault(Return(am::HmiInterfaces::STATE_NOT_AVAILABLE)); - SharedPtr<SetGlobalPropertiesRequest> command( + std::shared_ptr<SetGlobalPropertiesRequest> command( CreateCommand<SetGlobalPropertiesRequest>(msg)); OnEventTTSSetupHelper(msg, command); |