diff options
Diffstat (limited to 'src/components/application_manager/test/include/application_manager/commands/commands_test.h')
-rw-r--r-- | src/components/application_manager/test/include/application_manager/commands/commands_test.h | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/src/components/application_manager/test/include/application_manager/commands/commands_test.h b/src/components/application_manager/test/include/application_manager/commands/commands_test.h index 9a961ea1a9..cd0514a0da 100644 --- a/src/components/application_manager/test/include/application_manager/commands/commands_test.h +++ b/src/components/application_manager/test/include/application_manager/commands/commands_test.h @@ -36,38 +36,38 @@ #include <stdint.h> #include "gtest/gtest.h" -#include "smart_objects/smart_object.h" #include "application_manager/commands/command.h" +#include "smart_objects/smart_object.h" #include "application_manager/mock_application_manager.h" -#include "test/application_manager/mock_application_manager_settings.h" -#include "application_manager/test/include/application_manager/mock_hmi_interface.h" -#include "application_manager/test/include/application_manager/mock_application.h" -#include "application_manager/test/include/application_manager/mock_message_helper.h" #include "application_manager/mock_application_manager_settings.h" -#include "application_manager/mock_rpc_service.h" #include "application_manager/mock_hmi_capabilities.h" +#include "application_manager/mock_rpc_service.h" #include "application_manager/policies/mock_policy_handler_interface.h" +#include "application_manager/test/include/application_manager/mock_application.h" +#include "application_manager/test/include/application_manager/mock_hmi_interface.h" +#include "application_manager/test/include/application_manager/mock_message_helper.h" +#include "test/application_manager/mock_application_manager_settings.h" namespace test { namespace components { namespace commands_test { namespace am = ::application_manager; -using ::testing::ReturnRef; -using ::testing::Return; -using ::testing::NiceMock; -using ::testing::Mock; using ::testing::_; +using ::testing::Mock; +using ::testing::NiceMock; +using ::testing::Return; +using ::testing::ReturnRef; -using ::smart_objects::SmartObject; +using am::ApplicationSharedPtr; +using am::MockMessageHelper; using am::commands::MessageSharedPtr; +using ::smart_objects::SmartObject; +using ::test::components::application_manager_test::MockApplication; using ::test::components::application_manager_test::MockApplicationManager; using ::test::components::application_manager_test:: MockApplicationManagerSettings; -using am::ApplicationSharedPtr; -using am::MockMessageHelper; -using ::test::components::application_manager_test::MockApplication; // Depending on the value type will be selected template <const bool kIf, class ThenT, class ElseT> @@ -100,9 +100,8 @@ class CommandsTest : public ::testing::Test { typedef typename TypeIf<kIsNice, NiceMock<MockApplicationManager>, MockApplicationManager>::Result MockAppManager; - typedef typename TypeIf<kIsNice, - NiceMock<MockApplication>, - MockApplication>::Result MockApp; + typedef typename TypeIf<kIsNice, NiceMock<MockApplication>, MockApplication>:: + Result MockApp; typedef std::shared_ptr<MockApp> MockAppPtr; virtual ~CommandsTest() { @@ -183,11 +182,11 @@ class CommandsTest : public ::testing::Test { void InitHMIToMobileResultConverter() { namespace MobileResult = mobile_apis::Result; namespace HMIResult = hmi_apis::Common_Result; - auto link_hmi_to_mob_result = - [this](HMIResult::eType hmi_result, MobileResult::eType mobile_result) { - ON_CALL(mock_message_helper_, HMIToMobileResult(hmi_result)) - .WillByDefault(Return(mobile_result)); - }; + auto link_hmi_to_mob_result = [this](HMIResult::eType hmi_result, + MobileResult::eType mobile_result) { + ON_CALL(mock_message_helper_, HMIToMobileResult(hmi_result)) + .WillByDefault(Return(mobile_result)); + }; link_hmi_to_mob_result(HMIResult::INVALID_ENUM, MobileResult::INVALID_ENUM); link_hmi_to_mob_result(HMIResult::SUCCESS, MobileResult::SUCCESS); link_hmi_to_mob_result(HMIResult::UNSUPPORTED_REQUEST, @@ -233,17 +232,17 @@ class CommandsTest : public ::testing::Test { }; MATCHER_P(MobileResultCodeIs, result_code, "") { - return result_code == - static_cast<mobile_apis::Result::eType>( - (*arg)[application_manager::strings::msg_params] - [application_manager::strings::result_code].asInt()); + return result_code == static_cast<mobile_apis::Result::eType>( + (*arg)[application_manager::strings::msg_params] + [application_manager::strings::result_code] + .asInt()); } MATCHER_P(HMIResultCodeIs, result_code, "") { - return result_code == - static_cast<hmi_apis::FunctionID::eType>( - (*arg)[application_manager::strings::params] - [application_manager::strings::function_id].asInt()); + return result_code == static_cast<hmi_apis::FunctionID::eType>( + (*arg)[application_manager::strings::params] + [application_manager::strings::function_id] + .asInt()); } MATCHER_P3(MobileResponseIs, result_code, result_info, result_success, "") { |