diff options
Diffstat (limited to 'src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc')
-rw-r--r-- | src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc b/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc index 31d406d959..dfa38a758b 100644 --- a/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/get_dtcs_request_test.cc @@ -61,12 +61,18 @@ using am::commands::MessageSharedPtr; using am::commands::GetDTCsRequest; using am::event_engine::Event; using am::MockMessageHelper; +using testing::Mock; namespace mobile_result = mobile_apis::Result; typedef SharedPtr<GetDTCsRequest> GetDTCsRequestPtr; class GetDTCsRequestTest - : public CommandRequestTest<CommandsTestMocks::kIsNice> {}; + : public CommandRequestTest<CommandsTestMocks::kIsNice> { + public: + GetDTCsRequestTest() : CommandRequestTest<CommandsTestMocks::kIsNice>() { + Mock::VerifyAndClearExpectations(message_helper_mock_); + } +}; TEST_F(GetDTCsRequestTest, Run_ApplicationIsNotRegistered_UNSUCCESS) { GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>()); @@ -112,8 +118,6 @@ TEST_F(GetDTCsRequestTest, OnEvent_UnknownEvent_UNSUCCESS) { } TEST_F(GetDTCsRequestTest, OnEvent_SUCCESS) { - GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>()); - MessageSharedPtr event_msg(CreateMessage(smart_objects::SmartType_Map)); (*event_msg)[am::strings::msg_params] = 0; (*event_msg)[am::strings::params][am::hmi_response::code] = @@ -130,6 +134,10 @@ TEST_F(GetDTCsRequestTest, OnEvent_SUCCESS) { app_mngr_, ManageMobileCommand(MobileResultCodeIs(mobile_apis::Result::SUCCESS), _)); + MockAppPtr app(CreateMockApp()); + EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app)); + + GetDTCsRequestPtr command(CreateCommand<GetDTCsRequest>()); command->on_event(event); } |