diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc index b81823624c..2d51ee9d8a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_response_test.cc @@ -54,6 +54,7 @@ using ::testing::Return; namespace am = ::application_manager; namespace strings = ::application_manager::strings; namespace hmi_response = am::hmi_response; +namespace hmi_interface = ::application_manager::hmi_interface; using sdl_rpc_plugin::commands::VRGetSupportedLanguagesResponse; typedef std::shared_ptr<VRGetSupportedLanguagesResponse> @@ -91,6 +92,9 @@ TEST_F(VRGetSupportedLanguagesResponseTest, RUN_SUCCESS) { EXPECT_CALL(mock_hmi_capabilities_, set_vr_supported_languages((supported_languages))); + EXPECT_CALL(mock_hmi_capabilities_, + SaveCachedCapabilitiesToFile(hmi_interface::vr, _, _)); + ASSERT_TRUE(command->Init()); command->Run(); } @@ -109,6 +113,7 @@ TEST_F(VRGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) { EXPECT_CALL(mock_hmi_capabilities_, set_vr_supported_languages(supported_languages)) .Times(0); + ASSERT_TRUE(command->Init()); command->Run(); @@ -116,6 +121,23 @@ TEST_F(VRGetSupportedLanguagesResponseTest, RUN_UNSUCCESS) { am::hmi_response::languages)); } +TEST_F(VRGetSupportedLanguagesResponseTest, + onTimeOut_Run_ResponseForInterface_ReceivedError) { + MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map)); + (*command_msg)[strings::params][hmi_response::code] = + hmi_apis::Common_Result::ABORTED; + + VRGetSupportedLanguagesResponsePtr command( + CreateCommand<VRGetSupportedLanguagesResponse>(command_msg)); + + EXPECT_CALL(mock_hmi_capabilities_, + UpdateRequestsRequiredForCapabilities( + hmi_apis::FunctionID::VR_GetSupportedLanguages)); + ASSERT_TRUE(command->Init()); + + command->Run(); +} + } // namespace vr_get_supported_languages_response } // namespace hmi_commands_test } // namespace commands_test |