summaryrefslogtreecommitdiff
path: root/src/components/application_manager/test/commands/command_response_impl_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/test/commands/command_response_impl_test.cc')
-rw-r--r--src/components/application_manager/test/commands/command_response_impl_test.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/components/application_manager/test/commands/command_response_impl_test.cc b/src/components/application_manager/test/commands/command_response_impl_test.cc
index f95b9a49b2..07398d2132 100644
--- a/src/components/application_manager/test/commands/command_response_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_response_impl_test.cc
@@ -77,8 +77,8 @@ TEST_F(CommandResponseImplTest, SendResponse_MessageWithResultCode_SUCCESS) {
// If `msg_params->result_code` exist in message,
// then send message to mobile.
(*msg)[strings::msg_params][strings::result_code] = kResultCode;
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ ON_CALL(app_mngr_, GetRPCService()).WillByDefault(ReturnRef(rpc_service_));
+ EXPECT_CALL(rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);
}
@@ -93,8 +93,8 @@ TEST_F(CommandResponseImplTest,
const mobile_apis::Result::eType kResultCode =
mobile_apis::Result::eType::SUCCESS;
const bool kFinalResponse = true;
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ ON_CALL(app_mngr_, GetRPCService()).WillByDefault(ReturnRef(rpc_service_));
+ EXPECT_CALL(rpc_service_, SendMessageToMobile(msg, kFinalResponse));
// If `msg_params->result_code` does not exist in message
// and arg `result_code` not equals `INVALID_ENUM`,
@@ -121,8 +121,8 @@ TEST_F(CommandResponseImplTest,
// then if `params->hmi_response::code` exist in message,
// then set it to `msg_params->result_code` and send message to mobile.
(*msg)[strings::params][hmi_response::code] = mobile_apis::Result::SUCCESS;
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ ON_CALL(app_mngr_, GetRPCService()).WillByDefault(ReturnRef(rpc_service_));
+ EXPECT_CALL(rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);
@@ -146,8 +146,8 @@ TEST_F(CommandResponseImplTest,
// then if `kSuccess` equals `true`,
// then `msg_params->result_code` will be `SUCCESS`
const bool kSuccess = true;
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ ON_CALL(app_mngr_, GetRPCService()).WillByDefault(ReturnRef(rpc_service_));
+ EXPECT_CALL(rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);
@@ -171,8 +171,8 @@ TEST_F(CommandResponseImplTest,
// then if `kSuccess` equals `false`,
// then `msg_params->result_code` will be `INVALID_ENUM`
const bool kSuccess = false;
-
- EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, kFinalResponse));
+ ON_CALL(app_mngr_, GetRPCService()).WillByDefault(ReturnRef(rpc_service_));
+ EXPECT_CALL(rpc_service_, SendMessageToMobile(msg, kFinalResponse));
command->SendResponse(kSuccess, kResultCode, kFinalResponse);