diff options
Diffstat (limited to 'src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc')
-rw-r--r-- | src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc index c0a07fb57c..372d562965 100644 --- a/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc +++ b/src/components/application_manager/rpc_plugins/vehicle_info_plugin/test/commands/mobile/read_did_request_test.cc @@ -35,18 +35,17 @@ #include "gtest/gtest.h" -#include "smart_objects/smart_object.h" -#include "application_manager/commands/commands_test.h" -#include "application_manager/commands/command_request_test.h" #include "application_manager/application.h" -#include "application_manager/mock_application_manager.h" +#include "application_manager/event_engine/event.h" #include "application_manager/mock_application.h" +#include "application_manager/mock_application_manager.h" #include "application_manager/mock_message_helper.h" -#include "interfaces/MOBILE_API.h" -#include "interfaces/HMI_API.h" #include "application_manager/smart_object_keys.h" -#include "application_manager/event_engine/event.h" +#include "interfaces/HMI_API.h" +#include "interfaces/MOBILE_API.h" +#include "smart_objects/smart_object.h" #include "vehicle_info_plugin/commands/mobile/read_did_request.h" +#include "vehicle_info_plugin/commands/vi_command_request_test.h" namespace test { namespace components { @@ -59,16 +58,16 @@ using ::testing::DoAll; using ::testing::Return; using ::testing::SaveArg; namespace am = ::application_manager; -using vehicle_info_plugin::commands::ReadDIDRequest; using am::commands::MessageSharedPtr; using am::event_engine::Event; +using vehicle_info_plugin::commands::ReadDIDRequest; class ReadDIDRequestTest - : public CommandRequestTest<CommandsTestMocks::kIsNice> {}; + : public VICommandRequestTest<CommandsTestMocks::kIsNice> {}; TEST_F(ReadDIDRequestTest, OnEvent_WrongEventId_UNSUCCESS) { Event event(Event::EventID::INVALID_ENUM); - std::shared_ptr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>()); + std::shared_ptr<ReadDIDRequest> command(CreateCommandVI<ReadDIDRequest>()); EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _)).Times(0); command->on_event(event); } @@ -76,7 +75,7 @@ TEST_F(ReadDIDRequestTest, OnEvent_WrongEventId_UNSUCCESS) { TEST_F(ReadDIDRequestTest, OnEvent_SUCCESS) { Event event(Event::EventID::VehicleInfo_ReadDID); - std::shared_ptr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>()); + std::shared_ptr<ReadDIDRequest> command(CreateCommandVI<ReadDIDRequest>()); const hmi_apis::Common_Result::eType hmi_response_code = hmi_apis::Common_Result::SUCCESS; @@ -98,7 +97,7 @@ TEST_F(ReadDIDRequestTest, OnEvent_SUCCESS) { } TEST_F(ReadDIDRequestTest, Run_AppNotRegistered_UNSUCCESS) { - std::shared_ptr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>()); + std::shared_ptr<ReadDIDRequest> command(CreateCommandVI<ReadDIDRequest>()); ON_CALL(app_mngr_, application(_)) .WillByDefault(Return(std::shared_ptr<am::Application>())); @@ -111,7 +110,7 @@ TEST_F(ReadDIDRequestTest, Run_AppNotRegistered_UNSUCCESS) { } TEST_F(ReadDIDRequestTest, Run_CommandLimitsExceeded_UNSUCCESS) { - std::shared_ptr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>()); + std::shared_ptr<ReadDIDRequest> command(CreateCommandVI<ReadDIDRequest>()); MockAppPtr app(CreateMockApp()); ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app)); @@ -127,7 +126,7 @@ TEST_F(ReadDIDRequestTest, Run_CommandLimitsExceeded_UNSUCCESS) { TEST_F(ReadDIDRequestTest, Run_EmptyDidLocation_UNSUCCESS) { MockAppPtr app(CreateMockApp()); - std::shared_ptr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>()); + std::shared_ptr<ReadDIDRequest> command(CreateCommandVI<ReadDIDRequest>()); ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app)); @@ -144,7 +143,7 @@ TEST_F(ReadDIDRequestTest, Run_SUCCESS) { MockAppPtr app(CreateMockApp()); MessageSharedPtr msg(CreateMessage(smart_objects::SmartType_Map)); (*msg)[am::strings::msg_params][am::strings::did_location]["SomeData"] = 0; - std::shared_ptr<ReadDIDRequest> command(CreateCommand<ReadDIDRequest>(msg)); + std::shared_ptr<ReadDIDRequest> command(CreateCommandVI<ReadDIDRequest>(msg)); ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app)); |