summaryrefslogtreecommitdiff
path: root/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc')
-rw-r--r--src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc
index 016bb2bb1d..9cb5610621 100644
--- a/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc
+++ b/src/components/application_manager/test/commands/mobile/on_hmi_status_notification_test.cc
@@ -40,6 +40,7 @@ namespace test {
namespace components {
namespace commands_test {
namespace mobile_commands_test {
+namespace on_hmi_status_notification {
namespace {
const uint32_t kConnectionKey = 1u;
@@ -48,7 +49,7 @@ const uint32_t kConnectionKey = 1u;
namespace strings = application_manager::strings;
using application_manager::commands::OnHMIStatusNotification;
-using application_manager::ProtocolVersion;
+using protocol_handler::MajorProtocolVersion;
using application_manager::MockMessageHelper;
using application_manager::commands::CommandImpl;
using testing::Mock;
@@ -58,9 +59,6 @@ using testing::_;
class OnHMIStatusNotificationTest
: public CommandsTest<CommandsTestMocks::kIsNice> {
public:
- OnHMIStatusNotificationTest()
- : message_helper_(*MockMessageHelper::message_helper_mock()) {}
-
MessageSharedPtr CreateMsgParams(
const mobile_apis::HMILevel::eType kHMIState) {
MessageSharedPtr msg = CreateMessage();
@@ -69,13 +67,9 @@ class OnHMIStatusNotificationTest
return msg;
}
- void TearDown() OVERRIDE {
- Mock::VerifyAndClearExpectations(&message_helper_);
- }
-
void SetSendNotificationExpectations(MessageSharedPtr& msg) {
- Mock::VerifyAndClearExpectations(&message_helper_);
- EXPECT_CALL(message_helper_, PrintSmartObject(_)).WillOnce(Return(false));
+ EXPECT_CALL(mock_message_helper_, PrintSmartObject(_))
+ .WillOnce(Return(false));
EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _));
}
@@ -87,8 +81,6 @@ class OnHMIStatusNotificationTest
ASSERT_EQ(CommandImpl::protocol_version_,
(*msg)[strings::params][strings::protocol_version].asInt());
}
-
- MockMessageHelper& message_helper_;
};
TEST_F(OnHMIStatusNotificationTest, Run_InvalidApp_NoNotification) {
@@ -140,7 +132,7 @@ TEST_F(OnHMIStatusNotificationTest, Run_BackgroundAndFalseProperties_SUCCESS) {
EXPECT_CALL(*mock_app, tts_properties_in_none()).WillOnce(Return(false));
EXPECT_CALL(*mock_app, set_tts_properties_in_none(true));
- EXPECT_CALL(message_helper_, SendTTSGlobalProperties(_, false, _));
+ EXPECT_CALL(mock_message_helper_, SendTTSGlobalProperties(_, false, _));
command->Run();
@@ -207,6 +199,7 @@ TEST_F(OnHMIStatusNotificationTest, Run_FullAndTrueProperties_SUCCESS) {
VerifySendNotificationData(msg);
}
+} // namespace on_hmi_status_notification
} // namespace mobile_commands_test
} // namespace commands_test
} // namespace components