summaryrefslogtreecommitdiff
path: root/src/components/application_manager/test/commands/mobile/alert_request_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/test/commands/mobile/alert_request_test.cc')
-rw-r--r--src/components/application_manager/test/commands/mobile/alert_request_test.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/components/application_manager/test/commands/mobile/alert_request_test.cc b/src/components/application_manager/test/commands/mobile/alert_request_test.cc
index 43151c2d98..f83a40843c 100644
--- a/src/components/application_manager/test/commands/mobile/alert_request_test.cc
+++ b/src/components/application_manager/test/commands/mobile/alert_request_test.cc
@@ -56,7 +56,6 @@ using am::commands::AlertRequest;
using am::commands::CommandImpl;
using am::commands::MessageSharedPtr;
using am::MockMessageHelper;
-using am::MockHmiInterfaces;
using ::utils::SharedPtr;
using am::event_engine::Event;
using policy_test::MockPolicyHandlerInterface;
@@ -125,15 +124,13 @@ class AlertRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
ON_CALL(app_mngr_, application(kConnectionKey))
.WillByDefault(Return(mock_app_));
ON_CALL(*mock_app_, app_id()).WillByDefault(Return(kConnectionKey));
- ON_CALL(app_mngr_, hmi_interfaces())
- .WillByDefault(ReturnRef(hmi_interfaces_));
- ON_CALL(hmi_interfaces_,
+ ON_CALL(mock_hmi_interfaces_,
GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_UI))
.WillByDefault(
Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
- ON_CALL(hmi_interfaces_,
+ ON_CALL(mock_hmi_interfaces_,
GetInterfaceState(am::HmiInterfaces::HMI_INTERFACE_TTS))
.WillByDefault(
Return(am::HmiInterfaces::InterfaceState::STATE_NOT_AVAILABLE));
@@ -199,7 +196,6 @@ class AlertRequestTest : public CommandRequestTest<CommandsTestMocks::kIsNice> {
MockAppPtr mock_app_;
MessageSharedPtr msg_;
MockPolicyHandlerInterface mock_policy_handler_;
- NiceMock<MockHmiInterfaces> hmi_interfaces_;
};
TEST_F(AlertRequestTest, OnTimeout_GENERIC_ERROR) {
@@ -267,6 +263,9 @@ TEST_F(AlertRequestTest, OnEvent_UI_HmiSendSuccess_UNSUPPORTED_RESOURCE) {
event.set_smart_object(*msg);
MessageSharedPtr ui_command_result;
+ ON_CALL(mock_message_helper_,
+ HMIToMobileResult(hmi_apis::Common_Result::UNSUPPORTED_RESOURCE))
+ .WillByDefault(Return(am::mobile_api::Result::UNSUPPORTED_RESOURCE));
EXPECT_CALL(
app_mngr_,
ManageMobileCommand(_, am::commands::Command::CommandOrigin::ORIGIN_SDL))