diff options
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.cc | 52 |
1 files changed, 2 insertions, 50 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 2da0e60df1..acc7395cf3 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 @@ -59,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(); @@ -70,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, _)); } @@ -88,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) { @@ -128,45 +119,6 @@ TEST_F(OnHMIStatusNotificationTest, Run_InvalidEnum_SUCCESS) { VerifySendNotificationData(msg); } -TEST_F(OnHMIStatusNotificationTest, Run_BackgroundAndFalseProperties_SUCCESS) { - MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND); - SetSendNotificationExpectations(msg); - - SharedPtr<OnHMIStatusNotification> command = - CreateCommand<OnHMIStatusNotification>(msg); - - MockAppPtr mock_app = CreateMockApp(); - EXPECT_CALL(app_mngr_, application(kConnectionKey)) - .WillOnce(Return(mock_app)); - - 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, _)); - - command->Run(); - - VerifySendNotificationData(msg); -} - -TEST_F(OnHMIStatusNotificationTest, Run_BackgroundAndTrueProperties_SUCCESS) { - MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_BACKGROUND); - - SharedPtr<OnHMIStatusNotification> command = - CreateCommand<OnHMIStatusNotification>(msg); - - MockAppPtr mock_app = CreateMockApp(); - EXPECT_CALL(app_mngr_, application(kConnectionKey)) - .WillOnce(Return(mock_app)); - - EXPECT_CALL(*mock_app, tts_properties_in_none()).WillOnce(Return(true)); - - SetSendNotificationExpectations(msg); - - command->Run(); - - VerifySendNotificationData(msg); -} - TEST_F(OnHMIStatusNotificationTest, Run_FullAndFalseProperties_SUCCESS) { MessageSharedPtr msg = CreateMsgParams(mobile_apis::HMILevel::HMI_FULL); |