diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi')
4 files changed, 34 insertions, 10 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc index c66cb81141..5fa910b2d9 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/dummy_hmi_commands_test.cc @@ -30,13 +30,18 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "application_manager/commands/command_request_test.h" - #include <stdint.h> + #include <string> #include <vector> -#include "gtest/gtest.h" +#include "application_manager/commands/command_request_test.h" +#include "application_manager/commands/commands_test.h" +#include "application_manager/mock_application.h" +#include "application_manager/mock_application_manager.h" +#include "application_manager/mock_application_manager_settings.h" +#include "application_manager/mock_event_dispatcher.h" +#include "gtest/gtest.h" #include "hmi/activate_app_request.h" #include "hmi/activate_app_response.h" #include "hmi/add_statistics_info_notification.h" @@ -200,6 +205,8 @@ #include "hmi/ui_show_response.h" #include "hmi/ui_slider_request.h" #include "hmi/ui_slider_response.h" +#include "hmi/ui_subtle_alert_request.h" +#include "hmi/ui_subtle_alert_response.h" #include "hmi/update_app_list_request.h" #include "hmi/update_app_list_response.h" #include "hmi/update_device_list_request.h" @@ -223,12 +230,6 @@ #include "hmi/vr_perform_interaction_request.h" #include "hmi/vr_perform_interaction_response.h" -#include "application_manager/commands/commands_test.h" -#include "application_manager/mock_application.h" -#include "application_manager/mock_application_manager.h" -#include "application_manager/mock_application_manager_settings.h" -#include "application_manager/mock_event_dispatcher.h" - namespace am = application_manager; namespace test { @@ -499,7 +500,9 @@ typedef Types<commands::AllowAllAppsRequest, commands::AllowAppRequest, commands::AllowAppResponse, commands::BCGetFilePathRequest, - commands::BCGetFilePathResponse> + commands::BCGetFilePathResponse, + commands::UISubtleAlertResponse, + commands::UISubtleAlertRequest> HMICommandsListFifth; TYPED_TEST_CASE(HMICommandsTestFirst, HMICommandsListFirst); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc index 3819c720f8..cbb27bffb2 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/hmi_notifications_test.cc @@ -79,6 +79,7 @@ #include "sdl_rpc_plugin/commands/hmi/on_ui_keyboard_input_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_ui_language_change_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_ui_reset_timeout_notification.h" +#include "sdl_rpc_plugin/commands/hmi/on_ui_subtle_alert_pressed_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_ui_touch_event_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_video_data_streaming_notification.h" #include "sdl_rpc_plugin/commands/hmi/on_vr_command_notification.h" @@ -479,6 +480,21 @@ TEST_F(HMICommandsNotificationsTest, OnUITouchEventSendNotificationToMobile) { } TEST_F(HMICommandsNotificationsTest, + OnUISubtleAlertPressedSendNotificationToMobile) { + MessageSharedPtr message = CreateMessage(); + std::shared_ptr<Command> command = + CreateCommand<OnUISubtleAlertPressedNotification>(message); + EXPECT_CALL(mock_rpc_service_, + ManageMobileCommand(_, Command::CommandSource::SOURCE_SDL)); + command->Run(); + EXPECT_EQ( + static_cast<int32_t>(mobile_apis::FunctionID::OnSubtleAlertPressedID), + (*message)[am::strings::params][am::strings::function_id].asInt()); + EXPECT_EQ(static_cast<int32_t>(am::MessageType::kNotification), + (*message)[am::strings::params][am::strings::message_type].asInt()); +} + +TEST_F(HMICommandsNotificationsTest, OnAppRegisteredNotificationSendNotificationToHmi) { int32_t event_id = hmi_apis::FunctionID::INVALID_ENUM; MessageSharedPtr message = CreateMessage(); diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc index 162e832e9f..21260250ae 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_requests_to_hmi_test.cc @@ -85,6 +85,7 @@ #include "sdl_rpc_plugin/commands/hmi/ui_set_media_clock_timer_request.h" #include "sdl_rpc_plugin/commands/hmi/ui_show_request.h" #include "sdl_rpc_plugin/commands/hmi/ui_slider_request.h" +#include "sdl_rpc_plugin/commands/hmi/ui_subtle_alert_request.h" #include "sdl_rpc_plugin/commands/hmi/vr_add_command_request.h" #include "sdl_rpc_plugin/commands/hmi/vr_change_registration_request.h" #include "sdl_rpc_plugin/commands/hmi/vr_delete_command_request.h" @@ -156,6 +157,7 @@ typedef Types<sdl_rpc_plugin::commands::hmi::DialNumberRequest, sdl_rpc_plugin::commands::UIAddCommandRequest, sdl_rpc_plugin::commands::UIAddSubmenuRequest, sdl_rpc_plugin::commands::UIAlertRequest, + sdl_rpc_plugin::commands::UISubtleAlertRequest, sdl_rpc_plugin::commands::UIChangeRegistrationRequest, sdl_rpc_plugin::commands::UIDeleteCommandRequest, sdl_rpc_plugin::commands::UIDeleteSubmenuRequest, diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc index f232240c28..c406d38f3d 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/simple_response_from_hmi_test.cc @@ -79,6 +79,7 @@ #include "hmi/ui_set_media_clock_timer_response.h" #include "hmi/ui_show_response.h" #include "hmi/ui_slider_response.h" +#include "hmi/ui_subtle_alert_response.h" #include "hmi/update_app_list_response.h" #include "hmi/update_device_list_response.h" #include "hmi/vr_add_command_response.h" @@ -148,6 +149,8 @@ typedef Types< hmi_apis::FunctionID::UI_AddSubMenu>, CommandData<sdl_rpc_plugin::commands::UIAlertResponse, hmi_apis::FunctionID::UI_Alert>, + CommandData<sdl_rpc_plugin::commands::UISubtleAlertResponse, + hmi_apis::FunctionID::UI_SubtleAlert>, CommandData<sdl_rpc_plugin::commands::UIChangeRegistratioResponse, hmi_apis::FunctionID::UI_ChangeRegistration>, CommandData<sdl_rpc_plugin::commands::UIDeleteCommandResponse, |