diff options
Diffstat (limited to 'src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc')
-rw-r--r-- | src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc b/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc index 43f725012d..7840e35cec 100644 --- a/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc +++ b/src/components/application_manager/test/commands/mobile/on_system_request_notification_test.cc @@ -64,20 +64,7 @@ const uint32_t kConnectionKey = 1u; } // namespace class OnSystemRequestNotificationTest - : public CommandsTest<CommandsTestMocks::kIsNice> { - public: - OnSystemRequestNotificationTest() - : message_helper_(*MockMessageHelper::message_helper_mock()) {} - - void SetUp() OVERRIDE { - Mock::VerifyAndClearExpectations(&message_helper_); - } - - void TearDown() OVERRIDE { - Mock::VerifyAndClearExpectations(&message_helper_); - } - MockMessageHelper& message_helper_; -}; + : public CommandsTest<CommandsTestMocks::kIsNice> {}; TEST_F(OnSystemRequestNotificationTest, Run_ProprietaryType_SUCCESS) { const RequestType::eType kRequestType = RequestType::PROPRIETARY; @@ -107,7 +94,8 @@ TEST_F(OnSystemRequestNotificationTest, Run_ProprietaryType_SUCCESS) { EXPECT_CALL(mock_policy_handler, TimeoutExchangeSec()).WillOnce(Return(5u)); #endif // PROPRIETARY_MODE - EXPECT_CALL(message_helper_, PrintSmartObject(_)).WillOnce(Return(false)); + EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)) + .WillOnce(Return(false)); EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)); command->Run(); @@ -143,7 +131,8 @@ TEST_F(OnSystemRequestNotificationTest, Run_HTTPType_SUCCESS) { EXPECT_CALL(mock_policy_handler, IsRequestTypeAllowed(_, _)) .WillOnce(Return(true)); - EXPECT_CALL(message_helper_, PrintSmartObject(_)).WillOnce(Return(false)); + EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)) + .WillOnce(Return(false)); EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)); command->Run(); @@ -176,7 +165,7 @@ TEST_F(OnSystemRequestNotificationTest, Run_InvalidApp_NoNotification) { MockPolicyHandlerInterface mock_policy_handler; EXPECT_CALL(mock_policy_handler, IsRequestTypeAllowed(_, _)).Times(0); - EXPECT_CALL(message_helper_, PrintSmartObject(_)).Times(0); + EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0); EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)).Times(0); command->Run(); @@ -203,7 +192,7 @@ TEST_F(OnSystemRequestNotificationTest, Run_RequestNotAllowed_NoNotification) { EXPECT_CALL(mock_policy_handler, IsRequestTypeAllowed(_, _)) .WillOnce(Return(false)); - EXPECT_CALL(message_helper_, PrintSmartObject(_)).Times(0); + EXPECT_CALL(mock_message_helper_, PrintSmartObject(_)).Times(0); EXPECT_CALL(app_mngr_, SendMessageToMobile(msg, _)).Times(0); ; |