From 09a161ba3e35c10b3f1b5d6c8a2d17943dbf516a Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Mon, 29 Apr 2019 17:24:27 -0400 Subject: Run updated style script --- .../test/commands/button_press_request_test.cc | 49 +++++----- .../get_interior_vehicle_data_request_test.cc | 106 +++++++++++---------- .../on_interior_vehicle_data_notification_test.cc | 26 ++--- .../commands/on_remote_control_settings_test.cc | 32 +++---- .../rc_get_interior_vehicle_data_consent_test.cc | 61 ++++++------ .../set_interior_vehicle_data_request_test.cc | 41 ++++---- 6 files changed, 160 insertions(+), 155 deletions(-) (limited to 'src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands') diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc index e9d1063648..f2b86f43da 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc @@ -30,22 +30,26 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "gtest/gtest.h" #include "rc_rpc_plugin/commands/mobile/button_press_request.h" -#include "rc_rpc_plugin/rc_command_factory.h" -#include "rc_rpc_plugin/rc_app_extension.h" -#include "rc_rpc_plugin/rc_rpc_plugin.h" -#include "rc_rpc_plugin/rc_module_constants.h" -#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" -#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" -#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" +#include "application_manager/commands/command_request_test.h" #include "application_manager/mock_application.h" #include "application_manager/mock_application_manager.h" -#include "application_manager/commands/command_request_test.h" #include "application_manager/policies/mock_policy_handler_interface.h" +#include "gtest/gtest.h" #include "interfaces/HMI_API.h" #include "interfaces/MOBILE_API.h" +#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" +#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" +#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" +#include "rc_rpc_plugin/rc_app_extension.h" +#include "rc_rpc_plugin/rc_command_factory.h" +#include "rc_rpc_plugin/rc_module_constants.h" +#include "rc_rpc_plugin/rc_rpc_plugin.h" +using ::application_manager::Message; +using ::application_manager::MessageType; +using application_manager::commands::MessageSharedPtr; +using ::protocol_handler::MessagePriority; using test::components::application_manager_test::MockApplication; using test::components::commands_test::CommandRequestTest; using test::components::commands_test::CommandsTestMocks; @@ -57,17 +61,13 @@ using ::testing::NiceMock; using ::testing::Return; using ::testing::ReturnRef; using ::testing::SaveArg; -using ::application_manager::Message; -using ::application_manager::MessageType; -using application_manager::commands::MessageSharedPtr; -using ::protocol_handler::MessagePriority; namespace { const int kModuleId = 153u; const uint32_t kConnectionKey = 1u; const uint32_t kAppId = 0u; const std::string kPolicyAppId = "Test"; -} +} // namespace namespace rc_rpc_plugin_test { @@ -129,7 +129,8 @@ class ButtonPressRequestTest ON_CALL(mock_policy_handler_, CheckHMIType(kPolicyAppId, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, - nullptr)).WillByDefault(Return(true)); + nullptr)) + .WillByDefault(Return(true)); ON_CALL(mock_allocation_manager_, is_rc_enabled()) .WillByDefault(Return(true)); } @@ -194,10 +195,11 @@ TEST_F(ButtonPressRequestTest, EXPECT_CALL( mock_allocation_manager_, SetResourceState(resource, kAppId, rc_rpc_plugin::ResourceState::BUSY)); - EXPECT_CALL(mock_rpc_service_, - ManageHMICommand( - HMIResultCodeIs(hmi_apis::FunctionID::Buttons_ButtonPress), - _)).WillOnce(Return(true)); + EXPECT_CALL( + mock_rpc_service_, + ManageHMICommand( + HMIResultCodeIs(hmi_apis::FunctionID::Buttons_ButtonPress), _)) + .WillOnce(Return(true)); // Act std::shared_ptr command = @@ -229,10 +231,11 @@ TEST_F( EXPECT_CALL(mock_allocation_manager_, SetResourceState(resource, kAppId, _)) .Times(2); - EXPECT_CALL(mock_rpc_service_, - ManageHMICommand( - HMIResultCodeIs(hmi_apis::FunctionID::Buttons_ButtonPress), - _)).Times(0); + EXPECT_CALL( + mock_rpc_service_, + ManageHMICommand( + HMIResultCodeIs(hmi_apis::FunctionID::Buttons_ButtonPress), _)) + .Times(0); MessageSharedPtr command_result; EXPECT_CALL(mock_rpc_service_, ManageMobileCommand( diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc index 4e74e74ef8..9549830cec 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc @@ -31,42 +31,42 @@ */ #include "rc_rpc_plugin/commands/mobile/get_interior_vehicle_data_request.h" -#include "gtest/gtest.h" +#include "application_manager/commands/command_request_test.h" +#include "application_manager/event_engine/event_dispatcher.h" +#include "application_manager/message_helper.h" #include "application_manager/mock_application.h" +#include "gtest/gtest.h" +#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" +#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" +#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" #include "rc_rpc_plugin/rc_app_extension.h" +#include "rc_rpc_plugin/rc_command_factory.h" #include "rc_rpc_plugin/rc_module_constants.h" #include "rc_rpc_plugin/rc_rpc_plugin.h" -#include "application_manager/message_helper.h" -#include "rc_rpc_plugin/rc_command_factory.h" -#include "application_manager/event_engine/event_dispatcher.h" -#include "application_manager/commands/command_request_test.h" -#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" -#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" -#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" -#include #include +#include -using ::testing::_; -using ::testing::Mock; -using ::testing::NiceMock; -using ::testing::StrictMock; -using ::testing::Return; -using ::testing::ReturnRef; -using ::testing::SaveArg; +using application_manager::ApplicationSet; +using ::application_manager::ApplicationSharedPtr; using ::application_manager::Message; using ::application_manager::MessageType; -using application_manager::ApplicationSet; using application_manager::commands::MessageSharedPtr; -using ::application_manager::ApplicationSharedPtr; using ::protocol_handler::MessagePriority; using test::components::application_manager_test::MockApplication; using test::components::application_manager_test::MockApplicationManager; -using test::components::commands_test::MockApplicationManager; using test::components::commands_test::CommandRequestTest; using test::components::commands_test::CommandsTestMocks; using test::components::commands_test::HMIResultCodeIs; using test::components::commands_test::MobileResultCodeIs; +using test::components::commands_test::MockApplicationManager; +using ::testing::_; +using ::testing::Mock; +using ::testing::NiceMock; +using ::testing::Return; +using ::testing::ReturnRef; +using ::testing::SaveArg; +using ::testing::StrictMock; namespace { const int32_t kConnectionKey = 5u; @@ -76,7 +76,7 @@ const int kModuleId = 153u; const auto module_type = mobile_apis::ModuleType::RADIO; const int32_t time_frame_of_allowed_requests = 1; const uint32_t max_request_in_time_frame = 5u; -} +} // namespace namespace rc_rpc_plugin_test { @@ -193,9 +193,9 @@ TEST_F(GetInteriorVehicleDataRequestTest, .WillByDefault(Return(false)); ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_)) .WillByDefault(Return(true)); - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); // Expectations @@ -220,9 +220,9 @@ TEST_F(GetInteriorVehicleDataRequestTest, .WillByDefault(Return(false)); ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_)) .WillByDefault(Return(true)); - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); // Expectations @@ -245,9 +245,9 @@ TEST_F( [message_params::kModuleType] = module_type; smart_objects::SmartObject radio_data; radio_data[message_params::kBand] = enums_value::kAM; - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); // Expectations @@ -310,9 +310,9 @@ TEST_F( EXPECT_CALL(mock_interior_data_cache_, Remove(enums_value::kRadio)); // Act - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); command->Run(); application_manager::event_engine::Event event( @@ -339,9 +339,9 @@ TEST_F(GetInteriorVehicleDataRequestTest, radio_data[message_params::kBand] = enums_value::kAM; ON_CALL(app_mngr_, applications()).WillByDefault(Return(apps_da_)); - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); // Expectations @@ -377,9 +377,9 @@ TEST_F( ns_smart_device_link::ns_smart_objects::SmartObject& msg_params = (*mobile_message)[application_manager::strings::msg_params]; msg_params[message_params::kModuleType] = mobile_apis::ModuleType::RADIO; - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); smart_objects::SmartObject rc_capabilities; ON_CALL(mock_hmi_capabilities_, rc_capability()) @@ -387,10 +387,11 @@ TEST_F( // Expectations EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0); - EXPECT_CALL(mock_rpc_service_, - ManageMobileCommand( - MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), - _)).WillOnce((Return(true))); + EXPECT_CALL( + mock_rpc_service_, + ManageMobileCommand( + MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _)) + .WillOnce((Return(true))); // Act command->Run(); } @@ -403,9 +404,9 @@ TEST_F( ns_smart_device_link::ns_smart_objects::SmartObject& msg_params = (*mobile_message)[application_manager::strings::msg_params]; msg_params[message_params::kModuleType] = mobile_apis::ModuleType::RADIO; - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); ON_CALL(mock_policy_handler_, CheckModule(_, _)).WillByDefault(Return(false)); @@ -537,9 +538,9 @@ TEST_F(GetInteriorVehicleDataRequestTest, EXPECT_CALL(mock_interior_data_cache_, Clear()).Times(0); // Act - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); command->Run(); application_manager::event_engine::Event event( @@ -561,9 +562,9 @@ TEST_F(GetInteriorVehicleDataRequestTest, [message_params::kModuleType] = module_type; smart_objects::SmartObject radio_data; radio_data[message_params::kBand] = enums_value::kAM; - std::shared_ptr< - rc_rpc_plugin::commands::GetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>( mobile_message); size_t i = 0; for (; i <= max_request_in_time_frame; ++i) { @@ -579,7 +580,8 @@ TEST_F(GetInteriorVehicleDataRequestTest, mock_rpc_service_, ManageHMICommand( HMIResultCodeIs(hmi_apis::FunctionID::RC_GetInteriorVehicleData), - _)).WillRepeatedly(Return(true)); + _)) + .WillRepeatedly(Return(true)); // Act command->Run(); } diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc index b344471254..dcf36a34a0 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_interior_vehicle_data_notification_test.cc @@ -30,36 +30,36 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include "rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h" #include "application_manager/application.h" -#include "application_manager/mock_application.h" #include "application_manager/commands/commands_test.h" -#include "rc_rpc_plugin/commands/mobile/on_interior_vehicle_data_notification.h" -#include "rc_rpc_plugin/rc_rpc_plugin.h" -#include "rc_rpc_plugin/rc_module_constants.h" -#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" -#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" -#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" +#include "application_manager/mock_application.h" #include "gtest/gtest.h" #include "interfaces/MOBILE_API.h" +#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" +#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" +#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" +#include "rc_rpc_plugin/rc_module_constants.h" +#include "rc_rpc_plugin/rc_rpc_plugin.h" -using ::testing::_; -using ::testing::Return; -using ::testing::NiceMock; -using ::testing::SaveArg; -using ::testing::Mock; using application_manager::ApplicationSet; using application_manager::commands::MessageSharedPtr; using test::components::application_manager_test::MockApplication; using test::components::application_manager_test::MockApplicationManager; using test::components::commands_test::CommandsTest; using test::components::commands_test::CommandsTestMocks; +using ::testing::_; +using ::testing::Mock; +using ::testing::NiceMock; +using ::testing::Return; +using ::testing::SaveArg; namespace { const uint32_t kAppId = 0u; const uint32_t kConnectionKey = 1u; const std::string kPolicyAppId = "Test"; const int kModuleId = 153u; -} +} // namespace namespace rc_rpc_plugin_test { using namespace rc_rpc_plugin; diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc index b95725e0b4..6fbff118a4 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/on_remote_control_settings_test.cc @@ -32,34 +32,34 @@ #include "application_manager/application.h" #include "application_manager/commands/command_request_test.h" -#include "application_manager/mock_application.h" #include "application_manager/commands/commands_test.h" +#include "application_manager/mock_application.h" +#include "gtest/gtest.h" +#include "interfaces/MOBILE_API.h" #include "rc_rpc_plugin/commands/hmi/rc_on_remote_control_settings_notification.h" -#include "rc_rpc_plugin/rc_rpc_plugin.h" -#include "rc_rpc_plugin/rc_module_constants.h" -#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" #include "rc_rpc_plugin/mock/mock_interior_data_cache.h" #include "rc_rpc_plugin/mock/mock_interior_data_manager.h" -#include "gtest/gtest.h" -#include "interfaces/MOBILE_API.h" +#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" +#include "rc_rpc_plugin/rc_module_constants.h" +#include "rc_rpc_plugin/rc_rpc_plugin.h" -using ::testing::_; -using ::testing::Return; -using ::testing::NiceMock; -using ::testing::SaveArg; -using ::testing::Mock; using application_manager::ApplicationSet; using application_manager::commands::MessageSharedPtr; using test::components::application_manager_test::MockApplication; using test::components::application_manager_test::MockApplicationManager; using test::components::commands_test::CommandsTest; using test::components::commands_test::CommandsTestMocks; +using ::testing::_; +using ::testing::Mock; +using ::testing::NiceMock; +using ::testing::Return; +using ::testing::SaveArg; namespace { const uint32_t kAppId = 0u; const uint32_t kConnectionKey = 1u; const std::string kPolicyAppId = "Test"; -} +} // namespace namespace rc_rpc_plugin_test { using namespace rc_rpc_plugin; @@ -124,8 +124,8 @@ TEST_F(RCOnRemoteControlSettingsNotificationTest, SetAccessMode(hmi_apis::Common_RCAccessMode::ASK_DRIVER)); // Act std::shared_ptr< - rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification> command = - CreateRCCommand< + rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification> + command = CreateRCCommand< rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification>( mobile_message); @@ -144,8 +144,8 @@ TEST_F(RCOnRemoteControlSettingsNotificationTest, // Act std::shared_ptr< - rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification> command = - CreateRCCommand< + rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification> + command = CreateRCCommand< rc_rpc_plugin::commands::RCOnRemoteControlSettingsNotification>( mobile_message); diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc index 567d4b1e20..b28f2c972a 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/rc_get_interior_vehicle_data_consent_test.cc @@ -31,59 +31,58 @@ */ #include "application_manager/application.h" -#include "application_manager/mock_application.h" #include "application_manager/commands/command_request_test.h" -#include "application_manager/rpc_service_impl.h" -#include "application_manager/mock_request_controller_settings.h" #include "application_manager/include/application_manager/command_holder_impl.h" -#include "application_manager/mock_hmi_capabilities.h" -#include "application_manager/request_controller.h" -#include "application_manager/mock_rpc_plugin_manager.h" -#include "application_manager/mock_rpc_plugin.h" +#include "application_manager/message.h" +#include "application_manager/mock_application.h" #include "application_manager/mock_command_factory.h" #include "application_manager/mock_event_dispatcher.h" -#include "application_manager/message.h" -#include "rc_rpc_plugin/rc_rpc_plugin.h" -#include "rc_rpc_plugin/rc_module_constants.h" -#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" -#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" -#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" -#include "rc_rpc_plugin/commands/mobile/button_press_request.h" -#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h" -#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h" +#include "application_manager/mock_hmi_capabilities.h" +#include "application_manager/mock_request_controller_settings.h" +#include "application_manager/mock_rpc_plugin.h" +#include "application_manager/mock_rpc_plugin_manager.h" +#include "application_manager/request_controller.h" +#include "application_manager/rpc_service_impl.h" #include "hmi_message_handler/mock_hmi_message_handler.h" -#include "interfaces/MOBILE_API.h" #include "include/test/protocol_handler/mock_protocol_handler.h" +#include "interfaces/MOBILE_API.h" +#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_request.h" +#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_consent_response.h" +#include "rc_rpc_plugin/commands/mobile/button_press_request.h" +#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" +#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" +#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" +#include "rc_rpc_plugin/rc_module_constants.h" +#include "rc_rpc_plugin/rc_rpc_plugin.h" #include "test/application_manager/mock_application_manager_settings.h" using ::testing::_; +using ::testing::Mock; +using ::testing::NiceMock; using ::testing::Return; using ::testing::ReturnRef; -using ::testing::NiceMock; using ::testing::SaveArg; -using ::testing::Mock; -using ::testing::NiceMock; namespace am = ::application_manager; using am::ApplicationSet; -using am::commands::MessageSharedPtr; using am::commands::CommandImpl; +using am::commands::MessageSharedPtr; +using am::plugin_manager::MockRPCPlugin; +using am::plugin_manager::MockRPCPluginManager; using am::plugin_manager::RPCPlugin; -using ::smart_objects::SmartObject; +using rc_rpc_plugin::RCRPCPlugin; using rc_rpc_plugin::commands::ButtonPressRequest; -using rc_rpc_plugin::commands::RCGetInteriorVehicleDataConsentResponse; using rc_rpc_plugin::commands::RCGetInteriorVehicleDataConsentRequest; -using rc_rpc_plugin::RCRPCPlugin; -using test::components::commands_test::CommandsTestMocks; -using test::components::commands_test::CommandRequestTest; -using am::plugin_manager::MockRPCPluginManager; -using am::plugin_manager::MockRPCPlugin; +using rc_rpc_plugin::commands::RCGetInteriorVehicleDataConsentResponse; +using ::smart_objects::SmartObject; using test::components::application_manager_test::MockApplication; +using test::components::application_manager_test::MockCommandFactory; +using test::components::application_manager_test::MockHMICapabilities; using test::components::application_manager_test::MockRequestControlerSettings; -using test::components::protocol_handler_test::MockProtocolHandler; +using test::components::commands_test::CommandRequestTest; +using test::components::commands_test::CommandsTestMocks; using test::components::hmi_message_handler_test::MockHMIMessageHandler; -using test::components::application_manager_test::MockHMICapabilities; -using test::components::application_manager_test::MockCommandFactory; using test::components::policy_test::MockPolicyHandlerInterface; +using test::components::protocol_handler_test::MockProtocolHandler; namespace rc_rpc_plugin_test { using namespace rc_rpc_plugin; diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc index b1cb8271f5..66280eb183 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc @@ -30,34 +30,34 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h" #include "application_manager/application.h" #include "application_manager/commands/command_request_test.h" #include "application_manager/mock_application.h" -#include "rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h" -#include "rc_rpc_plugin/rc_rpc_plugin.h" -#include "rc_rpc_plugin/rc_module_constants.h" -#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" -#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" -#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" #include "gtest/gtest.h" #include "interfaces/MOBILE_API.h" +#include "rc_rpc_plugin/mock/mock_interior_data_cache.h" +#include "rc_rpc_plugin/mock/mock_interior_data_manager.h" +#include "rc_rpc_plugin/mock/mock_resource_allocation_manager.h" +#include "rc_rpc_plugin/rc_module_constants.h" +#include "rc_rpc_plugin/rc_rpc_plugin.h" -using ::testing::_; -using ::testing::Return; -using ::testing::NiceMock; using application_manager::ApplicationSet; using application_manager::commands::MessageSharedPtr; using test::components::application_manager_test::MockApplication; using test::components::application_manager_test::MockApplicationManager; using test::components::commands_test::CommandRequestTest; using test::components::commands_test::CommandsTestMocks; +using ::testing::_; +using ::testing::NiceMock; +using ::testing::Return; namespace { const uint32_t kAppId = 0u; const int kModuleId = 153u; const uint32_t kConnectionKey = 1u; const std::string kPolicyAppId = "Test"; -} +} // namespace namespace rc_rpc_plugin_test { using namespace rc_rpc_plugin; @@ -90,7 +90,8 @@ class SetInteriorVehicleDataRequestTest ON_CALL(mock_policy_handler_, CheckHMIType(kPolicyAppId, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, - nullptr)).WillByDefault(Return(true)); + nullptr)) + .WillByDefault(Return(true)); ON_CALL(mock_allocation_manager_, is_rc_enabled()) .WillByDefault(Return(true)); } @@ -154,9 +155,9 @@ TEST_F(SetInteriorVehicleDataRequestTest, mobile_apis::Result::READ_ONLY), application_manager::commands::Command::SOURCE_SDL)); // Act - std::shared_ptr< - rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( mobile_message); command->Run(); } @@ -193,9 +194,9 @@ TEST_F( application_manager::commands::Command::SOURCE_SDL)); // Act - std::shared_ptr< - rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( mobile_message); command->Run(); } @@ -224,9 +225,9 @@ TEST_F( application_manager::commands::Command::SOURCE_SDL)); // Act - std::shared_ptr< - rc_rpc_plugin::commands::SetInteriorVehicleDataRequest> command = - CreateRCCommand( + std::shared_ptr + command = CreateRCCommand< + rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>( mobile_message); command->Run(); } -- cgit v1.2.1