diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2018-07-23 16:52:38 -0400 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2018-07-23 16:52:38 -0400 |
commit | 5c4d3aa87ab16f894132038700e819595df8e9fc (patch) | |
tree | d9f67dd9f3961a8dd78a02c5ae6e7519aca388d7 /src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile | |
parent | 9727cd2cd185d2ea3ea028aab89cb419d1ad4a87 (diff) | |
download | sdl_core-5c4d3aa87ab16f894132038700e819595df8e9fc.tar.gz |
Fix style
Diffstat (limited to 'src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile')
-rw-r--r-- | src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc index 8e95f43752..5d6c6dc89e 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/dial_number_request_test.cc @@ -139,48 +139,45 @@ TEST_F(DialNumberRequestTest, Run_SUCCESS) { } TEST_F(DialNumberRequestTest, OnEvent_UnknownEvent_UNSUCCESS) { - MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map)); - (*command_msg)[am::strings::params][am::strings::connection_key] = - kConnectionKey; + MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map)); + (*command_msg)[am::strings::params][am::strings::connection_key] = + kConnectionKey; - DialNumberRequestPtr - command(CreateCommand<DialNumberRequest>(command_msg)); + DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg)); - MockAppPtr app(CreateMockApp()); - EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app)); + MockAppPtr app(CreateMockApp()); + EXPECT_CALL(app_mngr_, application(kConnectionKey)).WillOnce(Return(app)); - Event event(hmi_apis::FunctionID::INVALID_ENUM); - EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0); + Event event(hmi_apis::FunctionID::INVALID_ENUM); + EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0); command->on_event(event); } TEST_F(DialNumberRequestTest, OnEvent_SUCCESS) { - MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map)); - (*event_msg)[am::strings::params][am::hmi_response::code] = - mobile_apis::Result::SUCCESS; - (*event_msg)[am::strings::params][am::strings::info] = "test_info"; - - Event event(hmi_apis::FunctionID::BasicCommunication_DialNumber); - event.set_smart_object(*event_msg); - - MockAppPtr app(CreateMockApp()); - EXPECT_CALL(app_mngr_, application(kConnectionKey)) - .WillRepeatedly(Return(app)); - ON_CALL(app_mngr_, - GetRPCService()).WillByDefault(ReturnRef(mock_rpc_service_)); - EXPECT_CALL( - mock_rpc_service_, - ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), - _)); - - MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map)); - (*command_msg)[am::strings::params][am::strings::connection_key] = - kConnectionKey; - - DialNumberRequestPtr - command(CreateCommand<DialNumberRequest>(command_msg)); - command->on_event(event); + MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map)); + (*event_msg)[am::strings::params][am::hmi_response::code] = + mobile_apis::Result::SUCCESS; + (*event_msg)[am::strings::params][am::strings::info] = "test_info"; + + Event event(hmi_apis::FunctionID::BasicCommunication_DialNumber); + event.set_smart_object(*event_msg); + + MockAppPtr app(CreateMockApp()); + EXPECT_CALL(app_mngr_, application(kConnectionKey)) + .WillRepeatedly(Return(app)); + ON_CALL(app_mngr_, GetRPCService()) + .WillByDefault(ReturnRef(mock_rpc_service_)); + EXPECT_CALL( + mock_rpc_service_, + ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _)); + + MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map)); + (*command_msg)[am::strings::params][am::strings::connection_key] = + kConnectionKey; + + DialNumberRequestPtr command(CreateCommand<DialNumberRequest>(command_msg)); + command->on_event(event); } } // namespace dial_number_request |