summaryrefslogtreecommitdiff
path: root/src/components/application_manager/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/test')
-rw-r--r--src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc16
-rw-r--r--src/components/application_manager/test/app_launch/app_launch_data_db_test.cc12
-rw-r--r--src/components/application_manager/test/app_launch/app_launch_data_json_test.cc20
-rw-r--r--src/components/application_manager/test/app_service_manager_test.cc40
-rw-r--r--src/components/application_manager/test/application_helper_test.cc20
-rw-r--r--src/components/application_manager/test/application_impl_test.cc42
-rw-r--r--src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc14
-rw-r--r--src/components/application_manager/test/application_manager_impl_test.cc15
-rw-r--r--src/components/application_manager/test/application_state_test.cc12
-rw-r--r--src/components/application_manager/test/command_holder_test.cc8
-rw-r--r--src/components/application_manager/test/commands/command_impl_test.cc20
-rw-r--r--src/components/application_manager/test/commands/command_request_impl_test.cc34
-rw-r--r--src/components/application_manager/test/commands/command_response_impl_test.cc8
-rw-r--r--src/components/application_manager/test/event_engine_test.cc6
-rw-r--r--src/components/application_manager/test/hmi_capabilities_test.cc34
-rw-r--r--src/components/application_manager/test/hmi_language_handler_test.cc16
-rw-r--r--src/components/application_manager/test/include/application_manager/commands/command_request_test.h10
-rw-r--r--src/components/application_manager/test/include/application_manager/commands/commands_test.h59
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_app_launch_data.h2
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_application.h64
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_event_observer.h2
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_help_prompt_manager.h58
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_message_helper.h6
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_request.h2
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h4
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_resumption_data.h66
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_telemetry_observer.h2
-rw-r--r--src/components/application_manager/test/include/application_manager/resumption_data_test.h18
-rw-r--r--src/components/application_manager/test/include/application_manager/test_resumption_data_db.h6
-rw-r--r--src/components/application_manager/test/message_helper/message_helper_test.cc25
-rw-r--r--src/components/application_manager/test/mobile_message_handler_test.cc18
-rw-r--r--src/components/application_manager/test/mobile_message_handler_v1_test.cc10
-rw-r--r--src/components/application_manager/test/mock_application_helper.cc11
-rw-r--r--src/components/application_manager/test/mock_hmi_command_factory.cc13
-rw-r--r--src/components/application_manager/test/mock_message_helper.cc6
-rw-r--r--src/components/application_manager/test/policy_event_observer_test.cc2
-rw-r--r--src/components/application_manager/test/policy_handler_test.cc43
-rw-r--r--src/components/application_manager/test/rc_policy_handler_test.cc28
-rw-r--r--src/components/application_manager/test/request_controller/request_controller_test.cc21
-rw-r--r--src/components/application_manager/test/request_info_test.cc4
-rw-r--r--src/components/application_manager/test/request_tracker_test.cc8
-rw-r--r--src/components/application_manager/test/resumption/resume_ctrl_test.cc25
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_db_test.cc69
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_json_test.cc6
-rw-r--r--src/components/application_manager/test/resumption/resumption_data_test.cc39
-rw-r--r--src/components/application_manager/test/resumption_sql_queries_test.cc244
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc42
-rw-r--r--src/components/application_manager/test/usage_statistics_test.cc4
-rw-r--r--src/components/application_manager/test/zero_request_amount_test.cc10
49 files changed, 679 insertions, 565 deletions
diff --git a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
index 3293a8908d..b3bb8dd705 100644
--- a/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
+++ b/src/components/application_manager/test/app_launch/app_launch_ctrl_test.cc
@@ -30,16 +30,16 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
#include <sstream>
-#include "utils/macro.h"
#include "application_manager/app_launch/app_launch_ctrl_impl.h"
#include "application_manager/mock_app_launch_data.h"
#include "application_manager/mock_app_launch_settings.h"
-#include "application_manager/mock_resume_ctrl.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_resume_ctrl.h"
#include "connection_handler/mock_connection_handler.h"
+#include "gtest/gtest.h"
+#include "utils/macro.h"
#include "utils/test_async_waiter.h"
@@ -47,14 +47,14 @@ namespace test {
namespace components {
namespace app_launch_test {
+using ::testing::AtLeast;
+using ::testing::DoAll;
+using ::testing::InSequence;
+using ::testing::Invoke;
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
using ::testing::Truly;
-using ::testing::NiceMock;
-using ::testing::Invoke;
-using ::testing::AtLeast;
-using ::testing::InSequence;
-using ::testing::DoAll;
namespace ch_test = test::components::connection_handler_test;
namespace am_test = test::components::application_manager_test;
diff --git a/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc b/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc
index dc96fcf176..d0f2e21f4c 100644
--- a/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc
+++ b/src/components/application_manager/test/app_launch/app_launch_data_db_test.cc
@@ -31,18 +31,18 @@
*/
#include <algorithm>
+#include <memory>
#include <sstream>
#include <string>
-#include <memory>
#include "gtest/gtest.h"
-#include "utils/macro.h"
#include "sql_database.h"
#include "sql_query.h"
+#include "utils/macro.h"
-#include "utils/file_system.h"
-#include "application_manager/mock_app_launch_settings.h"
#include "application_manager/app_launch/app_launch_data_db.h"
#include "application_manager/app_launch/app_launch_sql_queries.h"
+#include "application_manager/mock_app_launch_settings.h"
+#include "utils/file_system.h"
namespace test {
namespace components {
@@ -51,9 +51,9 @@ namespace app_launch_test {
using namespace file_system;
using namespace app_launch;
-using ::testing::ReturnRef;
-using ::testing::Return;
using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::ReturnRef;
namespace {
const std::string kEmptyString = "";
diff --git a/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc b/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc
index 4541970c70..12a375685e 100644
--- a/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc
+++ b/src/components/application_manager/test/app_launch/app_launch_data_json_test.cc
@@ -30,27 +30,27 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "application_manager/app_launch/app_launch_data_json.h"
#include <algorithm>
-#include <sstream>
#include <memory>
-#include "json/json.h"
+#include <sstream>
+#include "application_manager/mock_app_launch_settings.h"
+#include "application_manager/smart_object_keys.h"
#include "gtest/gtest.h"
-#include "utils/macro.h"
-#include "utils/file_system.h"
-#include "utils/date_time.h"
+#include "json/json.h"
#include "resumption/last_state_impl.h"
#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/mock_app_launch_settings.h"
-#include "application_manager/app_launch/app_launch_data_json.h"
+#include "utils/date_time.h"
+#include "utils/file_system.h"
+#include "utils/macro.h"
namespace test {
namespace components {
namespace test_app_launch {
using ::testing::_;
-using ::testing::Return;
using ::testing::NiceMock;
+using ::testing::Return;
namespace am = application_manager;
using namespace Json;
@@ -339,6 +339,6 @@ TEST_F(AppLaunchDataJsonTest, SelectMultipleData) {
}
}
-} // namespace app_launch
+} // namespace test_app_launch
} // namespace components
} // namespace test
diff --git a/src/components/application_manager/test/app_service_manager_test.cc b/src/components/application_manager/test/app_service_manager_test.cc
index 526bbbdb7d..0f2b4469a2 100644
--- a/src/components/application_manager/test/app_service_manager_test.cc
+++ b/src/components/application_manager/test/app_service_manager_test.cc
@@ -134,13 +134,15 @@ class AppServiceManagerTest : public testing::Test {
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(
mobile_apis::ServiceUpdateReason::PUBLISHED),
- _)).WillOnce(Return());
+ _))
+ .WillOnce(Return());
if (first_run) {
EXPECT_CALL(*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(
mobile_apis::ServiceUpdateReason::ACTIVATED),
- _)).WillOnce(Return());
+ _))
+ .WillOnce(Return());
}
bool mobile_service = connection_key != kHMIConnectionKey;
return app_service_manager_.PublishAppService(
@@ -153,16 +155,17 @@ class AppServiceManagerTest : public testing::Test {
mobile_apis::ServiceUpdateReason::eType reason,
bool published,
bool active) {
- smart_objects::SmartObject& services_updated = msg_params
- [am::strings::system_capability][am::strings::app_services_capabilities]
- [am::strings::app_services];
+ smart_objects::SmartObject& services_updated =
+ msg_params[am::strings::system_capability]
+ [am::strings::app_services_capabilities]
+ [am::strings::app_services];
ASSERT_EQ(smart_objects::SmartType_Array, services_updated.getType());
EXPECT_EQ(length, services_updated.length());
for (size_t i = 0; i < services_updated.length(); i++) {
smart_objects::SmartObject& service_cap = services_updated[i];
- if (service_id ==
- service_cap[am::strings::updated_app_service_record]
- [am::strings::service_id].asString()) {
+ if (service_id == service_cap[am::strings::updated_app_service_record]
+ [am::strings::service_id]
+ .asString()) {
CheckCapability(service_cap, service_id, reason, published, active);
return;
}
@@ -208,14 +211,16 @@ TEST_F(AppServiceManagerTest, PublishAppService_Mobile_SUCCESS) {
*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(mobile_apis::ServiceUpdateReason::PUBLISHED),
- _)).WillOnce(DoAll(SaveArg<0>(&syscap_update_published), Return()));
+ _))
+ .WillOnce(DoAll(SaveArg<0>(&syscap_update_published), Return()));
smart_objects::SmartObject syscap_update_activated;
EXPECT_CALL(
*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(mobile_apis::ServiceUpdateReason::ACTIVATED),
- _)).WillOnce(DoAll(SaveArg<0>(&syscap_update_activated), Return()));
+ _))
+ .WillOnce(DoAll(SaveArg<0>(&syscap_update_activated), Return()));
auto record =
app_service_manager_.PublishAppService(manifest, true, kConnectionKey);
@@ -255,14 +260,16 @@ TEST_F(AppServiceManagerTest, PublishAppService_HMI_SUCCESS) {
*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(mobile_apis::ServiceUpdateReason::PUBLISHED),
- _)).WillOnce(DoAll(SaveArg<0>(&syscap_update_published), Return()));
+ _))
+ .WillOnce(DoAll(SaveArg<0>(&syscap_update_published), Return()));
smart_objects::SmartObject syscap_update_activated;
EXPECT_CALL(
*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(mobile_apis::ServiceUpdateReason::ACTIVATED),
- _)).WillOnce(DoAll(SaveArg<0>(&syscap_update_activated), Return()));
+ _))
+ .WillOnce(DoAll(SaveArg<0>(&syscap_update_activated), Return()));
auto record = app_service_manager_.PublishAppService(manifest, false);
@@ -297,7 +304,8 @@ TEST_F(AppServiceManagerTest, UnpublishAppService_SUCCESS) {
*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(mobile_apis::ServiceUpdateReason::REMOVED),
- _)).WillOnce(DoAll(SaveArg<0>(&syscap_update_unpublished), Return()));
+ _))
+ .WillOnce(DoAll(SaveArg<0>(&syscap_update_unpublished), Return()));
std::string service_id = record[am::strings::service_id].asString();
EXPECT_TRUE(app_service_manager_.UnpublishAppService(service_id));
@@ -319,7 +327,8 @@ TEST_F(AppServiceManagerTest, ActivateAppService_AlreadyActivated) {
*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(mobile_apis::ServiceUpdateReason::ACTIVATED),
- _)).Times(0);
+ _))
+ .Times(0);
std::string service_id = record[am::strings::service_id].asString();
EXPECT_TRUE(app_service_manager_.ActivateAppService(service_id));
@@ -337,7 +346,8 @@ TEST_F(AppServiceManagerTest, ActivateAppService_TwoApps_SUCCESS) {
*mock_message_helper_,
BroadcastCapabilityUpdate(
CapabilityUpdateMatcher(mobile_apis::ServiceUpdateReason::ACTIVATED),
- _)).WillOnce(DoAll(SaveArg<0>(&syscap_update_activated), Return()));
+ _))
+ .WillOnce(DoAll(SaveArg<0>(&syscap_update_activated), Return()));
std::string service_id = record[am::strings::service_id].asString();
std::string service_id2 = record2[am::strings::service_id].asString();
diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc
index 3203839fc2..d9d590a171 100644
--- a/src/components/application_manager/test/application_helper_test.cc
+++ b/src/components/application_manager/test/application_helper_test.cc
@@ -36,42 +36,42 @@
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_message_helper.h"
-#include "policy/usage_statistics/mock_statistics_manager.h"
#include "policy/mock_policy_settings.h"
+#include "policy/usage_statistics/mock_statistics_manager.h"
#include "application_manager/application.h"
#include "application_manager/application_impl.h"
#include "application_manager/application_manager_impl.h"
-#include "application_manager/usage_statistics.h"
#include "application_manager/helpers/application_helper.h"
#include "application_manager/smart_object_keys.h"
-#include "interfaces/MOBILE_API.h"
+#include "application_manager/usage_statistics.h"
#include "connection_handler/device.h"
+#include "interfaces/MOBILE_API.h"
#include "smart_objects/smart_object.h"
#include "utils/custom_string.h"
#include "utils/macro.h"
-#include "test/resumption/mock_last_state.h"
#include "media_manager/mock_media_manager.h"
+#include "test/resumption/mock_last_state.h"
namespace {
const uint8_t expected_tread_pool_size = 2u;
const uint8_t stop_streaming_timeout = 1u;
const std::string kDirectoryName = "./test_storage";
const std::vector<std::string> kTimeoutPrompt{"timeoutPrompt"};
-}
+} // namespace
namespace test {
namespace components {
namespace application_manager_test {
+using resumption_test::MockLastState;
+using test::components::media_manager_test::MockMediaManager;
using testing::_;
using ::testing::Mock;
using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
-using resumption_test::MockLastState;
-using test::components::media_manager_test::MockMediaManager;
using namespace application_manager;
using namespace policy_handler_test;
@@ -255,6 +255,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectHMICleanupRequests) {
application_manager::DeleteApplicationData(app_impl_, app_manager_impl_);
}
-} // application_manager_test
-} // components
-} // test
+} // namespace application_manager_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/test/application_impl_test.cc b/src/components/application_manager/test/application_impl_test.cc
index 437f567538..46d35bdbef 100644
--- a/src/components/application_manager/test/application_impl_test.cc
+++ b/src/components/application_manager/test/application_impl_test.cc
@@ -35,23 +35,23 @@
#include <stdint.h>
#include <iostream>
-#include "gtest/gtest.h"
#include "application_manager/hmi_state.h"
+#include "gtest/gtest.h"
#include "utils/file_system.h"
-#include "application_manager/mock_message_helper.h"
-#include "utils/custom_string.h"
+#include "application_manager/event_engine/event_dispatcher.h"
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application_manager_settings.h"
+#include "application_manager/mock_message_helper.h"
#include "application_manager/mock_request_controller_settings.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-#include "application_manager/state_controller.h"
-#include "resumption/last_state.h"
-#include "application_manager/resumption/resume_ctrl.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
#include "application_manager/mock_resume_ctrl.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/state_controller.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
+#include "resumption/last_state.h"
#include "smart_objects/smart_object.h"
+#include "utils/custom_string.h"
namespace test {
namespace components {
@@ -63,10 +63,10 @@ using namespace mobile_apis;
namespace custom_str = utils::custom_string;
using ::testing::_;
+using ::testing::AtLeast;
using ::testing::Mock;
using ::testing::Return;
using ::testing::ReturnRef;
-using ::testing::AtLeast;
using usage_statistics_test::MockStatisticsManager;
typedef void (ApplicationImpl::*AddSet)(HmiStatePtr args);
@@ -91,9 +91,11 @@ class ApplicationImplTest : public ::testing::Test {
EXPECT_CALL(mock_application_manager_settings_, app_storage_folder())
.WillRepeatedly(ReturnRef(directory_name));
EXPECT_CALL(mock_application_manager_settings_,
- audio_data_stopped_timeout()).WillOnce(Return(0));
+ audio_data_stopped_timeout())
+ .WillOnce(Return(0));
EXPECT_CALL(mock_application_manager_settings_,
- video_data_stopped_timeout()).WillOnce(Return(0));
+ video_data_stopped_timeout())
+ .WillOnce(Return(0));
app_impl.reset(
new ApplicationImpl(app_id,
policy_app_id,
@@ -666,7 +668,8 @@ TEST_F(ApplicationImplTest,
TEST_F(ApplicationImplTest, UpdateHash_AppMngrNotSuspended) {
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
- SendHashUpdateNotification(app_id, _)).Times(1);
+ SendHashUpdateNotification(app_id, _))
+ .Times(1);
resumprion_test::MockResumeCtrl mock_resume_ctrl;
EXPECT_CALL(mock_application_manager_, resume_controller())
.WillOnce(ReturnRef(mock_resume_ctrl));
@@ -678,7 +681,8 @@ TEST_F(ApplicationImplTest, UpdateHash_AppMngrNotSuspended) {
TEST_F(ApplicationImplTest, UpdateHash_AppMngrSuspended) {
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
- SendHashUpdateNotification(app_id, _)).Times(0);
+ SendHashUpdateNotification(app_id, _))
+ .Times(0);
resumprion_test::MockResumeCtrl mock_resume_ctrl;
EXPECT_CALL(mock_application_manager_, resume_controller())
.WillOnce(ReturnRef(mock_resume_ctrl));
@@ -699,7 +703,8 @@ TEST_F(ApplicationImplTest, SetVideoConfig_MobileNavi_StreamingNotApproved) {
TEST_F(ApplicationImplTest, SetVideoConfig_MobileNavi_StreamingApproved) {
app_impl->set_video_streaming_approved(true);
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
- SendNaviSetVideoConfig(app_id, _, _)).Times(0);
+ SendNaviSetVideoConfig(app_id, _, _))
+ .Times(0);
smart_objects::SmartObject params;
app_impl->SetVideoConfig(protocol_handler::ServiceType::kMobileNav, params);
@@ -707,7 +712,8 @@ TEST_F(ApplicationImplTest, SetVideoConfig_MobileNavi_StreamingApproved) {
TEST_F(ApplicationImplTest, SetVideoConfig_NotMobileNavi) {
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
- SendNaviSetVideoConfig(app_id, _, _)).Times(0);
+ SendNaviSetVideoConfig(app_id, _, _))
+ .Times(0);
smart_objects::SmartObject params;
app_impl->SetVideoConfig(protocol_handler::ServiceType::kAudio, params);
@@ -732,13 +738,15 @@ TEST_F(ApplicationImplTest, StartStreaming_Audio_StreamingNotApproved) {
TEST_F(ApplicationImplTest, StartStreaming_StreamingApproved) {
app_impl->set_video_streaming_approved(true);
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
- SendNaviStartStream(app_id, _)).Times(0);
+ SendNaviStartStream(app_id, _))
+ .Times(0);
app_impl->StartStreaming(protocol_handler::ServiceType::kMobileNav);
app_impl->set_audio_streaming_approved(true);
EXPECT_CALL(*MockMessageHelper::message_helper_mock(),
- SendAudioStartStream(app_id, _)).Times(0);
+ SendAudioStartStream(app_id, _))
+ .Times(0);
app_impl->StartStreaming(protocol_handler::ServiceType::kAudio);
}
diff --git a/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc b/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc
index 8ab852779a..939ef98620 100644
--- a/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc
@@ -33,25 +33,25 @@
#include <memory>
#include <string>
-#include "gtest/gtest.h"
#include "application_manager/application.h"
#include "application_manager/application_impl.h"
#include "application_manager/application_manager_impl.h"
+#include "gtest/gtest.h"
#include "utils/custom_string.h"
#include "encryption/hashing.h"
#include "application_manager/mock_application_manager_settings.h"
-#include "application_manager/mock_resumption_data.h"
#include "application_manager/mock_command_factory.h"
#include "application_manager/mock_request.h"
+#include "application_manager/mock_resumption_data.h"
+#include "application_manager/mock_rpc_plugin.h"
+#include "application_manager/mock_rpc_plugin_manager.h"
#include "connection_handler/mock_connection_handler.h"
#include "policy/mock_policy_settings.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
-#include "protocol_handler/mock_session_observer.h"
#include "protocol_handler/mock_protocol_handler.h"
-#include "application_manager/mock_rpc_plugin_manager.h"
-#include "application_manager/mock_rpc_plugin.h"
+#include "protocol_handler/mock_session_observer.h"
#include "utils/optional.h"
namespace test {
@@ -63,9 +63,9 @@ namespace am = application_manager;
using testing::_;
using ::testing::DoAll;
using ::testing::Mock;
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
-using ::testing::NiceMock;
using ::testing::SetArgPointee;
using namespace application_manager;
@@ -269,6 +269,6 @@ TEST_F(ApplicationManagerImplMockHmiTest,
Mock::VerifyAndClearExpectations(&mock_command_factory);
}
-} // application_manager_test
+} // namespace application_manager_test
} // namespace components
} // namespace test
diff --git a/src/components/application_manager/test/application_manager_impl_test.cc b/src/components/application_manager/test/application_manager_impl_test.cc
index e4951880de..12ca199862 100644
--- a/src/components/application_manager/test/application_manager_impl_test.cc
+++ b/src/components/application_manager/test/application_manager_impl_test.cc
@@ -39,10 +39,10 @@
#include "application_manager/application.h"
#include "application_manager/application_impl.h"
#include "application_manager/application_manager_impl.h"
+#include "application_manager/mock_app_service_manager.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_resumption_data.h"
-#include "application_manager/mock_app_service_manager.h"
#include "application_manager/mock_rpc_plugin_manager.h"
#include "application_manager/mock_rpc_service.h"
#include "application_manager/policies/mock_policy_handler_interface.h"
@@ -177,7 +177,8 @@ class ApplicationManagerImplTest : public ::testing::Test {
ON_CALL(mock_application_manager_settings_, default_timeout())
.WillByDefault(ReturnRef(kTimeout));
ON_CALL(mock_application_manager_settings_,
- application_list_update_timeout()).WillByDefault(Return(kTimeout));
+ application_list_update_timeout())
+ .WillByDefault(Return(kTimeout));
app_manager_impl_.reset(new am::ApplicationManagerImpl(
mock_application_manager_settings_, mock_policy_settings_));
@@ -1154,9 +1155,10 @@ bool ApplicationManagerImplTest::CheckResumptionRequiredTransportAvailableTest(
TransportTypeProfileStringFromDeviceHandle(secondary_device_handle))
.WillOnce(Return(secondary_transport_device_string));
} else {
- EXPECT_CALL(mock_session_observer_,
- TransportTypeProfileStringFromDeviceHandle(
- secondary_device_handle)).WillOnce(Return(std::string("")));
+ EXPECT_CALL(
+ mock_session_observer_,
+ TransportTypeProfileStringFromDeviceHandle(secondary_device_handle))
+ .WillOnce(Return(std::string("")));
}
return app_manager_impl_->CheckResumptionRequiredTransportAvailable(
@@ -1572,7 +1574,8 @@ TEST_F(ApplicationManagerImplTest,
testing::An<connection_handler::DeviceHandle*>()))
.WillOnce(DoAll(SetArgPointee<3u>(kDeviceId), Return(0)));
EXPECT_CALL(*mock_rpc_service_,
- ManageMobileCommand(_, commands::Command::SOURCE_SDL)).Times(0);
+ ManageMobileCommand(_, commands::Command::SOURCE_SDL))
+ .Times(0);
smart_objects::SmartObject request_for_registration(
smart_objects::SmartType_Map);
diff --git a/src/components/application_manager/test/application_state_test.cc b/src/components/application_manager/test/application_state_test.cc
index a0bfa2890f..5ebcdd29c7 100644
--- a/src/components/application_manager/test/application_state_test.cc
+++ b/src/components/application_manager/test/application_state_test.cc
@@ -31,15 +31,15 @@
*/
#include "application_manager/application_state.h"
-#include "gtest/gtest.h"
+#include "application_manager/event_engine/event_dispatcher.h"
#include "application_manager/hmi_state.h"
-#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-#include "resumption/last_state.h"
+#include "application_manager/mock_application_manager.h"
#include "application_manager/policies/policy_handler.h"
-#include "application_manager/state_controller.h"
#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/state_controller.h"
+#include "gtest/gtest.h"
+#include "resumption/last_state.h"
namespace test {
namespace components {
@@ -60,7 +60,7 @@ std::vector<StateID> GenerateCurrentStates() {
states.push_back(StateID::STATE_ID_DEACTIVATE_HMI);
return states;
}
-}
+} // namespace
class ApplicationStateTest : public ::testing::Test {
public:
diff --git a/src/components/application_manager/test/command_holder_test.cc b/src/components/application_manager/test/command_holder_test.cc
index 9496e37924..8a5c639775 100644
--- a/src/components/application_manager/test/command_holder_test.cc
+++ b/src/components/application_manager/test/command_holder_test.cc
@@ -36,8 +36,8 @@
#include "application_manager/commands/command.h"
#include "smart_objects/smart_object.h"
-#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application.h"
+#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_rpc_service.h"
namespace test {
@@ -173,6 +173,6 @@ TEST_F(CommandHolderImplTest, Hold_Mobile_and_HMI_commands_ExpectReleased) {
am::CommandHolder::CommandType::kMobileCommand);
}
-} // application_manager_test
-} // components
-} // test
+} // namespace application_manager_test
+} // namespace components
+} // namespace test
diff --git a/src/components/application_manager/test/commands/command_impl_test.cc b/src/components/application_manager/test/commands/command_impl_test.cc
index 53e8534c2b..734a7d91b8 100644
--- a/src/components/application_manager/test/commands/command_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_impl_test.cc
@@ -31,35 +31,35 @@
*/
#include <stdint.h>
-#include <string>
#include <algorithm>
#include <functional>
#include <set>
+#include <string>
#include "gtest/gtest.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
+#include "application_manager/application_manager.h"
#include "application_manager/commands/command.h"
#include "application_manager/commands/command_impl.h"
-#include "application_manager/application_manager.h"
+#include "application_manager/commands/commands_test.h"
#include "application_manager/mock_application.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
namespace test {
namespace components {
namespace commands_test {
namespace command_impl {
-using ::testing::Return;
-using ::testing::AtLeast;
using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::Return;
namespace strings = ::application_manager::strings;
-using ::application_manager::commands::CommandImpl;
using ::application_manager::ApplicationManager;
-using ::application_manager::commands::MessageSharedPtr;
using ::application_manager::ApplicationSharedPtr;
+using ::application_manager::commands::CommandImpl;
+using ::application_manager::commands::MessageSharedPtr;
using ::test::components::application_manager_test::MockApplication;
typedef std::shared_ptr<MockApplication> MockAppPtr;
@@ -82,8 +82,8 @@ class CommandImplTest : public CommandsTest<CommandsTestMocks::kIsNice> {
public:
class UnwrappedCommandImpl : CommandImpl {
public:
- using CommandImpl::ReplaceMobileWithHMIAppId;
using CommandImpl::ReplaceHMIWithMobileAppId;
+ using CommandImpl::ReplaceMobileWithHMIAppId;
UnwrappedCommandImpl(
const MessageSharedPtr& message,
diff --git a/src/components/application_manager/test/commands/command_request_impl_test.cc b/src/components/application_manager/test/commands/command_request_impl_test.cc
index 6d80a11440..cf26c19249 100644
--- a/src/components/application_manager/test/commands/command_request_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_request_impl_test.cc
@@ -31,25 +31,25 @@
*/
#include <stdint.h>
-#include <string>
#include <algorithm>
+#include <string>
-#include "gtest/gtest.h"
#include "application_manager/commands/command_impl.h"
#include "application_manager/commands/command_request_impl.h"
-#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/command_request_test.h"
+#include "application_manager/commands/commands_test.h"
+#include "gtest/gtest.h"
#include "utils/lock.h"
-#include "utils/data_accessor.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
#include "application_manager/application_manager.h"
-#include "application_manager/mock_application.h"
#include "application_manager/event_engine/event.h"
-#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_application.h"
#include "application_manager/mock_hmi_interface.h"
+#include "application_manager/mock_message_helper.h"
+#include "application_manager/smart_object_keys.h"
#include "interfaces/MOBILE_API.h"
+#include "smart_objects/smart_object.h"
+#include "utils/data_accessor.h"
#include "application_manager/mock_app_service_manager.h"
#include "resumption/last_state_impl.h"
@@ -64,20 +64,20 @@ namespace strings = am::strings;
namespace hmi_response = am::hmi_response;
using ::testing::_;
+using ::testing::DoAll;
using ::testing::Return;
using ::testing::SaveArg;
-using ::testing::DoAll;
using ::testing::SetArgReferee;
-using am::commands::MessageSharedPtr;
-using am::CommandParametersPermissions;
-using am::event_engine::EventObserver;
-using am::commands::CommandImpl;
-using am::commands::CommandRequestImpl;
using am::ApplicationManager;
using am::ApplicationSet;
-using am::RPCParams;
+using am::CommandParametersPermissions;
using am::MockHmiInterfaces;
+using am::RPCParams;
+using am::commands::CommandImpl;
+using am::commands::CommandRequestImpl;
+using am::commands::MessageSharedPtr;
+using am::event_engine::EventObserver;
using test::components::application_manager_test::MockAppServiceManager;
typedef am::commands::CommandRequestImpl::RequestState RequestState;
@@ -105,10 +105,10 @@ class CommandRequestImplTest
class UnwrappedCommandRequestImpl : public CommandRequestImpl {
public:
- using CommandRequestImpl::CheckAllowedParameters;
- using CommandRequestImpl::RemoveDisallowedParameters;
using CommandRequestImpl::AddDisallowedParameters;
+ using CommandRequestImpl::CheckAllowedParameters;
using CommandRequestImpl::HasDisallowedParams;
+ using CommandRequestImpl::RemoveDisallowedParameters;
UnwrappedCommandRequestImpl(const MessageSharedPtr& message,
ApplicationManager& am,
diff --git a/src/components/application_manager/test/commands/command_response_impl_test.cc b/src/components/application_manager/test/commands/command_response_impl_test.cc
index 41cc654a24..6362ea702e 100644
--- a/src/components/application_manager/test/commands/command_response_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_response_impl_test.cc
@@ -35,12 +35,12 @@
#include "gtest/gtest.h"
-#include "smart_objects/smart_object.h"
-#include "application_manager/smart_object_keys.h"
-#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/command.h"
#include "application_manager/commands/command_response_impl.h"
+#include "application_manager/commands/commands_test.h"
#include "application_manager/mock_application.h"
+#include "application_manager/smart_object_keys.h"
+#include "smart_objects/smart_object.h"
namespace test {
namespace components {
@@ -50,8 +50,8 @@ namespace command_response_impl {
namespace strings = ::application_manager::strings;
namespace hmi_response = ::application_manager::hmi_response;
-using ::application_manager::commands::MessageSharedPtr;
using ::application_manager::commands::CommandResponseImpl;
+using ::application_manager::commands::MessageSharedPtr;
class CommandResponseImplTest
: public CommandsTest<CommandsTestMocks::kIsNice> {};
diff --git a/src/components/application_manager/test/event_engine_test.cc b/src/components/application_manager/test/event_engine_test.cc
index de0b5afb3c..598d12f109 100644
--- a/src/components/application_manager/test/event_engine_test.cc
+++ b/src/components/application_manager/test/event_engine_test.cc
@@ -32,11 +32,11 @@
#include "gtest/gtest.h"
-#include "application_manager/event_engine/event_observer.h"
#include "application_manager/event_engine/event.h"
#include "application_manager/event_engine/event_dispatcher_impl.h"
-#include "application_manager/mock_event_observer.h"
+#include "application_manager/event_engine/event_observer.h"
#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_event_observer.h"
#include "smart_objects/smart_object.h"
#include "interfaces/HMI_API.h"
@@ -45,8 +45,8 @@ namespace test {
namespace components {
namespace event_engine_test {
-using application_manager::event_engine::EventDispatcherImpl;
using application_manager::event_engine::Event;
+using application_manager::event_engine::EventDispatcherImpl;
using application_manager::event_engine::EventObserver;
using testing::_;
diff --git a/src/components/application_manager/test/hmi_capabilities_test.cc b/src/components/application_manager/test/hmi_capabilities_test.cc
index d67dfebaa5..e883e7bddb 100644
--- a/src/components/application_manager/test/hmi_capabilities_test.cc
+++ b/src/components/application_manager/test/hmi_capabilities_test.cc
@@ -36,32 +36,32 @@
#include <string>
#include "application_manager/hmi_capabilities.h"
-#include "gtest/gtest.h"
-#include "smart_objects/smart_object.h"
#include "application_manager/mock_message_helper.h"
-#include "smart_objects/enum_schema_item.h"
+#include "gtest/gtest.h"
#include "interfaces/HMI_API.h"
+#include "smart_objects/enum_schema_item.h"
+#include "smart_objects/smart_object.h"
#include "application_manager/hmi_capabilities_for_testing.h"
-#include "utils/file_system.h"
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_event_dispatcher.h"
#include "application_manager/mock_rpc_service.h"
+#include "application_manager/resumption/resume_ctrl.h"
#include "application_manager/state_controller.h"
#include "resumption/last_state_impl.h"
-#include "application_manager/resumption/resume_ctrl.h"
+#include "utils/file_system.h"
namespace test {
namespace components {
namespace application_manager_test {
using ::testing::_;
-using ::testing::Return;
-using ::testing::ReturnRef;
using ::testing::AtLeast;
-using ::testing::Invoke;
using ::testing::InSequence;
+using ::testing::Invoke;
+using ::testing::Return;
+using ::testing::ReturnRef;
using namespace application_manager;
@@ -76,7 +76,8 @@ class HMICapabilitiesTest : public ::testing::Test {
EXPECT_CALL(app_mngr_, get_settings())
.WillRepeatedly(ReturnRef(mock_application_manager_settings_));
EXPECT_CALL(mock_application_manager_settings_,
- hmi_capabilities_file_name()).WillOnce(ReturnRef(file_name_));
+ hmi_capabilities_file_name())
+ .WillOnce(ReturnRef(file_name_));
EXPECT_CALL(mock_event_dispatcher, add_observer(_, _, _)).Times(1);
EXPECT_CALL(mock_event_dispatcher, remove_observer(_)).Times(1);
EXPECT_CALL(mock_application_manager_settings_, launch_hmi())
@@ -140,9 +141,9 @@ struct CStringComparator {
}
};
-typedef std::map<const char*,
- hmi_apis::Common_Language::eType,
- CStringComparator> CStringToEnumMap;
+typedef std::
+ map<const char*, hmi_apis::Common_Language::eType, CStringComparator>
+ CStringToEnumMap;
CStringToEnumMap InitCStringToEnumMap() {
size_t value = sizeof(cstring_values_) / sizeof(cstring_values_[0]);
@@ -407,7 +408,8 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
.asInt());
EXPECT_EQ(350,
vs_capability_so[strings::preferred_resolution]
- [strings::resolution_height].asInt());
+ [strings::resolution_height]
+ .asInt());
EXPECT_TRUE(vs_capability_so.keyExists(strings::max_bitrate));
EXPECT_EQ(10000, vs_capability_so[strings::max_bitrate].asInt());
EXPECT_TRUE(vs_capability_so.keyExists(strings::supported_formats));
@@ -454,7 +456,8 @@ TEST_F(HMICapabilitiesTest, LoadCapabilitiesFromFile) {
rc_capability_so["climateControlCapabilities"][0]["fanSpeedAvailable"]
.asBool());
EXPECT_TRUE(rc_capability_so["climateControlCapabilities"][0]
- ["desiredTemperatureAvailable"].asBool());
+ ["desiredTemperatureAvailable"]
+ .asBool());
EXPECT_TRUE(
rc_capability_so["climateControlCapabilities"][0]["acEnableAvailable"]
.asBool());
@@ -582,7 +585,8 @@ TEST_F(HMICapabilitiesTest, VerifyImageType) {
void HMICapabilitiesTest::SetCooperating() {
smart_objects::SmartObjectSPtr test_so;
EXPECT_CALL(*(MockMessageHelper::message_helper_mock()),
- CreateModuleInfoSO(_, _)).WillRepeatedly(Return(test_so));
+ CreateModuleInfoSO(_, _))
+ .WillRepeatedly(Return(test_so));
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
.WillRepeatedly(Return(true));
}
diff --git a/src/components/application_manager/test/hmi_language_handler_test.cc b/src/components/application_manager/test/hmi_language_handler_test.cc
index ec88075212..5f07c1b9d1 100644
--- a/src/components/application_manager/test/hmi_language_handler_test.cc
+++ b/src/components/application_manager/test/hmi_language_handler_test.cc
@@ -32,18 +32,18 @@
#include <stdint.h>
-#include "gtest/gtest.h"
#include "application_manager/application_manager.h"
#include "application_manager/hmi_language_handler.h"
-#include "application_manager/state_controller.h"
+#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_message_helper.h"
-#include "application_manager/resumption/resume_ctrl_impl.h"
#include "application_manager/mock_hmi_capabilities.h"
-#include "application_manager/mock_application.h"
+#include "application_manager/mock_message_helper.h"
#include "application_manager/mock_rpc_service.h"
+#include "application_manager/resumption/resume_ctrl_impl.h"
#include "application_manager/smart_object_keys.h"
+#include "application_manager/state_controller.h"
+#include "gtest/gtest.h"
#include "test/resumption/mock_last_state.h"
#include "utils/lock.h"
@@ -54,13 +54,13 @@ namespace hmi_language_handler {
namespace am = ::application_manager;
-using am::event_engine::Event;
using am::ApplicationSet;
+using am::event_engine::Event;
+using ::testing::_;
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
-using ::testing::NiceMock;
-using ::testing::_;
typedef NiceMock<
::test::components::application_manager_test::MockApplicationManager>
diff --git a/src/components/application_manager/test/include/application_manager/commands/command_request_test.h b/src/components/application_manager/test/include/application_manager/commands/command_request_test.h
index 8dd29ce244..3a44d7b3ff 100644
--- a/src/components/application_manager/test/include/application_manager/commands/command_request_test.h
+++ b/src/components/application_manager/test/include/application_manager/commands/command_request_test.h
@@ -37,11 +37,11 @@
#include "gtest/gtest.h"
-#include "smart_objects/smart_object.h"
+#include "application_manager/commands/command_request_impl.h"
#include "application_manager/smart_object_keys.h"
#include "application_manager/test/include/application_manager/commands/commands_test.h"
-#include "application_manager/commands/command_request_impl.h"
#include "application_manager/test/include/application_manager/mock_event_dispatcher.h"
+#include "smart_objects/smart_object.h"
#include "application_manager/event_engine/event.h"
@@ -49,12 +49,12 @@ namespace test {
namespace components {
namespace commands_test {
+using ::test::components::event_engine_test::MockEventDispatcher;
using ::testing::_;
-using ::testing::Return;
-using ::testing::SaveArg;
using ::testing::DoAll;
using ::testing::NiceMock;
-using ::test::components::event_engine_test::MockEventDispatcher;
+using ::testing::Return;
+using ::testing::SaveArg;
namespace am = ::application_manager;
using am::commands::Command;
using am::commands::CommandRequestImpl;
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, "") {
diff --git a/src/components/application_manager/test/include/application_manager/mock_app_launch_data.h b/src/components/application_manager/test/include/application_manager/mock_app_launch_data.h
index 881ebb2575..9f50a73075 100644
--- a/src/components/application_manager/test/include/application_manager/mock_app_launch_data.h
+++ b/src/components/application_manager/test/include/application_manager/mock_app_launch_data.h
@@ -33,8 +33,8 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_APP_LAUNCH_DATA_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_APP_LAUNCH_DATA_H_
-#include "gmock/gmock.h"
#include "application_manager/app_launch/app_launch_data.h"
+#include "gmock/gmock.h"
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/include/application_manager/mock_application.h b/src/components/application_manager/test/include/application_manager/mock_application.h
index 36d20f227d..74d09661c7 100644
--- a/src/components/application_manager/test/include/application_manager/mock_application.h
+++ b/src/components/application_manager/test/include/application_manager/mock_application.h
@@ -1,43 +1,43 @@
/*
* Copyright (c) 2016, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_APPLICATION_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_APPLICATION_H_
#include <string>
-#include "gmock/gmock.h"
-#include "application_manager/application.h"
#include "application_manager/app_extension.h"
+#include "application_manager/application.h"
+#include "application_manager/usage_statistics.h"
+#include "gmock/gmock.h"
#include "smart_objects/smart_object.h"
#include "utils/custom_string.h"
-#include "application_manager/usage_statistics.h"
#include "utils/semantic_version.h"
namespace test {
diff --git a/src/components/application_manager/test/include/application_manager/mock_event_observer.h b/src/components/application_manager/test/include/application_manager/mock_event_observer.h
index 8af31c1998..54dcfc5774 100644
--- a/src/components/application_manager/test/include/application_manager/mock_event_observer.h
+++ b/src/components/application_manager/test/include/application_manager/mock_event_observer.h
@@ -33,8 +33,8 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_EVENT_OBSERVER_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_EVENT_OBSERVER_H_
-#include "application_manager/event_engine/event_observer.h"
#include "application_manager/event_engine/event.h"
+#include "application_manager/event_engine/event_observer.h"
#include "gmock/gmock.h"
namespace test {
diff --git a/src/components/application_manager/test/include/application_manager/mock_help_prompt_manager.h b/src/components/application_manager/test/include/application_manager/mock_help_prompt_manager.h
index a415f94d56..b44345deff 100644
--- a/src/components/application_manager/test/include/application_manager/mock_help_prompt_manager.h
+++ b/src/components/application_manager/test/include/application_manager/mock_help_prompt_manager.h
@@ -1,34 +1,34 @@
/*
* Copyright (c) 2018, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HELP_PROMPT_MANAGER_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_HELP_PROMPT_MANAGER_H_
diff --git a/src/components/application_manager/test/include/application_manager/mock_message_helper.h b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
index ac39c39f22..ec13137abe 100644
--- a/src/components/application_manager/test/include/application_manager/mock_message_helper.h
+++ b/src/components/application_manager/test/include/application_manager/mock_message_helper.h
@@ -32,13 +32,13 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_MESSAGE_HELPER_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_MESSAGE_HELPER_H_
-#include "gmock/gmock.h"
#include "application_manager/application.h"
+#include "application_manager/application_manager.h"
#include "application_manager/message_helper.h"
+#include "application_manager/policies/policy_handler_interface.h"
+#include "gmock/gmock.h"
#include "interfaces/HMI_API.h"
#include "policy/policy_types.h"
-#include "application_manager/policies/policy_handler_interface.h"
-#include "application_manager/application_manager.h"
#include "smart_objects/smart_object.h"
#include "transport_manager/common.h"
diff --git a/src/components/application_manager/test/include/application_manager/mock_request.h b/src/components/application_manager/test/include/application_manager/mock_request.h
index e4cfa84841..dfc6691ef4 100644
--- a/src/components/application_manager/test/include/application_manager/mock_request.h
+++ b/src/components/application_manager/test/include/application_manager/mock_request.h
@@ -33,8 +33,8 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_REQUEST_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_REQUEST_H_
-#include "gmock/gmock.h"
#include "application_manager/commands/command.h"
+#include "gmock/gmock.h"
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h b/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
index 0fa7a898be..4fd3b7fc5a 100644
--- a/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
+++ b/src/components/application_manager/test/include/application_manager/mock_resume_ctrl.h
@@ -31,9 +31,9 @@
*/
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_RESUME_CTRL_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_RESUME_CTRL_H_
-#include "gmock/gmock.h"
-#include "application_manager/resumption/resume_ctrl.h"
#include "application_manager/application.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "gmock/gmock.h"
#include "resumption/last_state.h"
namespace test {
diff --git a/src/components/application_manager/test/include/application_manager/mock_resumption_data.h b/src/components/application_manager/test/include/application_manager/mock_resumption_data.h
index 38d1944dba..7cabc12086 100644
--- a/src/components/application_manager/test/include/application_manager/mock_resumption_data.h
+++ b/src/components/application_manager/test/include/application_manager/mock_resumption_data.h
@@ -1,42 +1,42 @@
/*
-* Copyright (c) 2016, Ford Motor Company
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-*
-* Redistributions of source code must retain the above copyright notice, this
-* list of conditions and the following disclaimer.
-*
-* Redistributions in binary form must reproduce the above copyright notice,
-* this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided with the
-* distribution.
-*
-* Neither the name of the Ford Motor Company nor the names of its contributors
-* may be used to endorse or promote products derived from this software
-* without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+ * Copyright (c) 2016, Ford Motor Company
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Ford Motor Company nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_RESUMPTION_DATA_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_RESUMPTION_DATA_H_
#include <string>
-#include "gmock/gmock.h"
-#include "application_manager/resumption/resumption_data.h"
#include "application_manager/application.h"
-#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application_manager_settings.h"
+#include "application_manager/resumption/resumption_data.h"
+#include "gmock/gmock.h"
#include "smart_objects/smart_object.h"
namespace test {
diff --git a/src/components/application_manager/test/include/application_manager/mock_telemetry_observer.h b/src/components/application_manager/test/include/application_manager/mock_telemetry_observer.h
index cd4632965c..c79a31817e 100644
--- a/src/components/application_manager/test/include/application_manager/mock_telemetry_observer.h
+++ b/src/components/application_manager/test/include/application_manager/mock_telemetry_observer.h
@@ -33,8 +33,8 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_TELEMETRY_OBSERVER_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_MOCK_TELEMETRY_OBSERVER_H_
-#include "gmock/gmock.h"
#include "application_manager/telemetry_observer.h"
+#include "gmock/gmock.h"
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/include/application_manager/resumption_data_test.h b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
index 4e614c4d9f..cab3c23253 100644
--- a/src/components/application_manager/test/include/application_manager/resumption_data_test.h
+++ b/src/components/application_manager/test/include/application_manager/resumption_data_test.h
@@ -33,20 +33,20 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_RESUMPTION_DATA_TEST_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_RESUMPTION_DATA_TEST_H_
-#include <string>
#include <algorithm>
-#include "gtest/gtest.h"
-#include "application_manager/usage_statistics.h"
+#include <string>
+#include "application_manager/event_engine/event_dispatcher.h"
+#include "application_manager/mock_app_extension.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_app_extension.h"
-#include "utils/data_accessor.h"
-#include "config_profile/profile.h"
+#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/policies/policy_handler.h"
-#include "application_manager/state_controller.h"
#include "application_manager/resumption/resume_ctrl.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-#include "application_manager/mock_application_manager_settings.h"
+#include "application_manager/state_controller.h"
+#include "application_manager/usage_statistics.h"
+#include "config_profile/profile.h"
+#include "gtest/gtest.h"
+#include "utils/data_accessor.h"
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h b/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h
index e10f60afac..3f5802cb5a 100644
--- a/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h
+++ b/src/components/application_manager/test/include/application_manager/test_resumption_data_db.h
@@ -33,10 +33,10 @@
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_TEST_RESUMPTION_DATA_DB_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_INCLUDE_APPLICATION_MANAGER_TEST_RESUMPTION_DATA_DB_H_
-#include "utils/sqlite_wrapper/sql_database.h"
-#include "application_manager/resumption/resumption_data_db.h"
-#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_application_manager_settings.h"
+#include "application_manager/resumption/resumption_data_db.h"
+#include "utils/sqlite_wrapper/sql_database.h"
using ::resumption::ResumptionDataDB;
diff --git a/src/components/application_manager/test/message_helper/message_helper_test.cc b/src/components/application_manager/test/message_helper/message_helper_test.cc
index 92be221ec9..d0fbe696cd 100644
--- a/src/components/application_manager/test/message_helper/message_helper_test.cc
+++ b/src/components/application_manager/test/message_helper/message_helper_test.cc
@@ -36,18 +36,18 @@
#include "gmock/gmock.h"
#include "utils/macro.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/mock_application.h"
-#include "application_manager/mock_help_prompt_manager.h"
-#include "utils/custom_string.h"
-#include "utils/lock.h"
-#include "policy/mock_policy_settings.h"
#include "application_manager/commands/command_impl.h"
+#include "application_manager/event_engine/event_dispatcher.h"
+#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_help_prompt_manager.h"
#include "application_manager/mock_rpc_service.h"
-#include "application_manager/event_engine/event_dispatcher.h"
-#include "application_manager/state_controller.h"
+#include "application_manager/policies/policy_handler.h"
#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/state_controller.h"
+#include "policy/mock_policy_settings.h"
+#include "utils/custom_string.h"
+#include "utils/lock.h"
#include "policy/policy_table/types.h"
#include "rpc_base/rpc_base_json_inl.h"
@@ -70,12 +70,12 @@ typedef std::shared_ptr<MockApplication> MockApplicationSharedPtr;
typedef std::vector<std::string> StringArray;
typedef std::shared_ptr<application_manager::Application> ApplicationSharedPtr;
+using testing::_;
using testing::AtLeast;
-using testing::ReturnRefOfCopy;
-using testing::ReturnRef;
using testing::Return;
+using testing::ReturnRef;
+using testing::ReturnRefOfCopy;
using testing::SaveArg;
-using testing::_;
TEST(MessageHelperTestCreate,
CreateBlockedByPoliciesResponse_SmartObject_Equal) {
@@ -951,7 +951,8 @@ TEST_F(MessageHelperTest, SubscribeApplicationToSoftButton_CallFromApp) {
size_t function_id = 1;
//
EXPECT_CALL(*appSharedPtr,
- SubscribeToSoftButtons(function_id, SoftButtonID())).Times(1);
+ SubscribeToSoftButtons(function_id, SoftButtonID()))
+ .Times(1);
MessageHelper::SubscribeApplicationToSoftButton(
message_params, appSharedPtr, function_id);
}
diff --git a/src/components/application_manager/test/mobile_message_handler_test.cc b/src/components/application_manager/test/mobile_message_handler_test.cc
index 23957b61fb..cac04d4508 100644
--- a/src/components/application_manager/test/mobile_message_handler_test.cc
+++ b/src/components/application_manager/test/mobile_message_handler_test.cc
@@ -32,30 +32,30 @@
#include "application_manager/mobile_message_handler.h"
-#include <string>
-#include <ctime>
#include <algorithm>
+#include <ctime>
#include <iterator>
+#include <string>
#include <vector>
-#include "gmock/gmock.h"
#include "application_manager/message.h"
+#include "gmock/gmock.h"
#include "protocol/raw_message.h"
namespace test {
namespace components {
namespace application_manager_test {
+using ::application_manager::Message;
+using ::application_manager::MobileMessage;
+using application_manager::MobileMessageHandler;
+using protocol_handler::MajorProtocolVersion;
+using protocol_handler::MessagePriority;
+using protocol_handler::PROTOCOL_HEADER_V2_SIZE;
using protocol_handler::RawMessage;
using protocol_handler::RawMessagePtr;
using protocol_handler::ServiceType;
-using protocol_handler::MessagePriority;
-using protocol_handler::PROTOCOL_HEADER_V2_SIZE;
-using application_manager::MobileMessageHandler;
-using protocol_handler::MajorProtocolVersion;
using ::testing::_;
-using ::application_manager::Message;
-using ::application_manager::MobileMessage;
using testing::Return;
diff --git a/src/components/application_manager/test/mobile_message_handler_v1_test.cc b/src/components/application_manager/test/mobile_message_handler_v1_test.cc
index 5cbc28b20c..7801798705 100644
--- a/src/components/application_manager/test/mobile_message_handler_v1_test.cc
+++ b/src/components/application_manager/test/mobile_message_handler_v1_test.cc
@@ -32,19 +32,19 @@
#include "application_manager/mobile_message_handler.h"
-#include <string>
-#include <vector>
#include <algorithm>
#include <iterator>
+#include <string>
+#include <vector>
-#include "gmock/gmock.h"
#include "application_manager/message.h"
+#include "gmock/gmock.h"
#include "protocol/raw_message.h"
+using application_manager::MobileMessageHandler;
+using protocol_handler::PROTOCOL_HEADER_V1_SIZE;
using protocol_handler::RawMessage;
using protocol_handler::RawMessagePtr;
-using protocol_handler::PROTOCOL_HEADER_V1_SIZE;
-using application_manager::MobileMessageHandler;
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/mock_application_helper.cc b/src/components/application_manager/test/mock_application_helper.cc
index c64a56e53e..ea57709a73 100644
--- a/src/components/application_manager/test/mock_application_helper.cc
+++ b/src/components/application_manager/test/mock_application_helper.cc
@@ -41,15 +41,16 @@ MockApplicationHelper& MockApplicationHelper::application_helper_mock() {
return application_helper_mock;
}
-} // application_manager_test
-} // components
-} // test
+} // namespace application_manager_test
+} // namespace components
+} // namespace test
namespace application_manager {
void DeleteApplicationData(ApplicationSharedPtr app,
ApplicationManager& app_manager) {
test::components::application_manager_test::MockApplicationHelper::
- application_helper_mock().RecallApplicationData(app, app_manager);
+ application_helper_mock()
+ .RecallApplicationData(app, app_manager);
}
-} // application_managers
+} // namespace application_manager
diff --git a/src/components/application_manager/test/mock_hmi_command_factory.cc b/src/components/application_manager/test/mock_hmi_command_factory.cc
index 375da26067..5f76a9300b 100644
--- a/src/components/application_manager/test/mock_hmi_command_factory.cc
+++ b/src/components/application_manager/test/mock_hmi_command_factory.cc
@@ -30,9 +30,9 @@
POSSIBILITY OF SUCH DAMAGE.
*/
+#include "application_manager/mock_hmi_command_factory.h"
#include <gmock/gmock.h>
#include "application_manager/rpc_plugins/sdl_rpc_plugin/include/sdl_rpc_plugin/hmi_command_factory.h"
-#include "application_manager/mock_hmi_command_factory.h"
namespace test {
namespace components {
@@ -43,9 +43,9 @@ MockHMICommandFactory* MockHMICommandFactory::mock_hmi_command_factory() {
return &mock_hmi_command_factory;
}
-} // application_manager_test
-} // components
-} // test
+} // namespace application_manager_test
+} // namespace components
+} // namespace test
namespace sdl_rpc_plugin {
namespace app_mngr = application_manager;
@@ -53,6 +53,7 @@ app_mngr::CommandSharedPtr HMICommandFactory::CreateCommand(
const app_mngr::commands::MessageSharedPtr& message,
app_mngr::ApplicationManager& application_manager) {
return test::components::application_manager_test::MockHMICommandFactory::
- mock_hmi_command_factory()->CreateCommand(message, application_manager);
+ mock_hmi_command_factory()
+ ->CreateCommand(message, application_manager);
}
-} // application_manager
+} // namespace sdl_rpc_plugin
diff --git a/src/components/application_manager/test/mock_message_helper.cc b/src/components/application_manager/test/mock_message_helper.cc
index 518761c315..0629619397 100644
--- a/src/components/application_manager/test/mock_message_helper.cc
+++ b/src/components/application_manager/test/mock_message_helper.cc
@@ -30,12 +30,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "application_manager/message_helper.h"
#include "application_manager/mock_message_helper.h"
+#include "application_manager/message_helper.h"
#include "application_manager/policies/policy_handler_interface.h"
-#include "transport_manager/common.h"
-#include "gtest/gtest.h"
#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+#include "transport_manager/common.h"
namespace application_manager {
diff --git a/src/components/application_manager/test/policy_event_observer_test.cc b/src/components/application_manager/test/policy_event_observer_test.cc
index 9b97f054b3..a74b12071c 100644
--- a/src/components/application_manager/test/policy_event_observer_test.cc
+++ b/src/components/application_manager/test/policy_event_observer_test.cc
@@ -33,10 +33,10 @@
#include "application_manager/policies/policy_event_observer.h"
#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/mock_event_dispatcher.h"
#include "gmock/gmock.h"
#include "policy/policy_types.h"
#include "smart_objects/smart_object.h"
-#include "application_manager/mock_event_dispatcher.h"
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/policy_handler_test.cc b/src/components/application_manager/test/policy_handler_test.cc
index af21a705bf..458b065cdd 100644
--- a/src/components/application_manager/test/policy_handler_test.cc
+++ b/src/components/application_manager/test/policy_handler_test.cc
@@ -30,48 +30,47 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <fstream>
#include <string>
#include <vector>
-#include <fstream>
#include "gmock/gmock.h"
-#include "application_manager/policies/policy_handler.h"
+#include "application_manager/application_impl.h"
+#include "application_manager/application_manager_impl.h"
#include "application_manager/policies/delegates/app_permission_delegate.h"
+#include "application_manager/policies/policy_handler.h"
#include "connection_handler/connection_handler_impl.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application_impl.h"
#ifdef ENABLE_SECURITY
-#include "security_manager/mock_security_manager.h"
#include "security_manager/mock_crypto_manager.h"
+#include "security_manager/mock_security_manager.h"
#endif // ENABLE_SECURITY
#include "application_manager/mock_message_helper.h"
#include "connection_handler/mock_connection_handler_settings.h"
-#include "transport_manager/mock_transport_manager.h"
-#include "policy/policy_types.h"
#include "json/reader.h"
-#include "json/writer.h"
#include "json/value.h"
+#include "json/writer.h"
+#include "policy/policy_types.h"
#include "smart_objects/smart_object.h"
+#include "transport_manager/mock_transport_manager.h"
#include "utils/file_system.h"
-#include "utils/custom_string.h"
-#include "policy/usage_statistics/counter.h"
-#include "policy/usage_statistics/statistics_manager.h"
#include "interfaces/MOBILE_API.h"
#include "policy/mock_policy_settings.h"
+#include "policy/usage_statistics/counter.h"
+#include "policy/usage_statistics/statistics_manager.h"
+#include "utils/custom_string.h"
#include "application_manager/mock_application.h"
-#include "policy/usage_statistics/mock_statistics_manager.h"
-#include "protocol_handler/mock_session_observer.h"
-#include "connection_handler/mock_connection_handler.h"
#include "application_manager/mock_application_manager.h"
-#include "application_manager/policies/mock_policy_handler_observer.h"
#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/mock_state_controller.h"
#include "application_manager/mock_hmi_capabilities.h"
#include "application_manager/mock_rpc_service.h"
+#include "application_manager/mock_state_controller.h"
+#include "application_manager/policies/mock_policy_handler_observer.h"
+#include "connection_handler/mock_connection_handler.h"
#include "policy/mock_policy_manager.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
+#include "protocol_handler/mock_session_observer.h"
namespace test {
namespace components {
@@ -510,7 +509,8 @@ TEST_F(PolicyHandlerTest, OnPermissionsUpdated_TwoParams_InvalidApp_UNSUCCESS) {
EXPECT_CALL(app_manager_, application_by_policy_id(kPolicyAppId_))
.WillOnce(Return(invalid_app));
EXPECT_CALL(mock_message_helper_,
- SendOnPermissionsChangeNotification(_, _, _)).Times(0);
+ SendOnPermissionsChangeNotification(_, _, _))
+ .Times(0);
Permissions permissions;
policy_handler_.OnPermissionsUpdated(kPolicyAppId_, permissions);
@@ -978,7 +978,8 @@ TEST_F(PolicyHandlerTest,
AppPermissions permissions(kPolicyAppId_);
permissions.appPermissionsConsentNeeded = false;
EXPECT_CALL(mock_message_helper_,
- SendOnAppPermissionsChangedNotification(kAppId1_, _, _)).Times(0);
+ SendOnAppPermissionsChangedNotification(kAppId1_, _, _))
+ .Times(0);
EXPECT_CALL(*mock_policy_manager_, GetAppPermissionsChanges(_))
.WillOnce(Return(permissions));
@@ -1117,7 +1118,8 @@ TEST_F(PolicyHandlerTest,
// Check expectations
// Notification won't be sent
EXPECT_CALL(mock_message_helper_,
- SendOnAppPermissionsChangedNotification(kAppId1_, _, _)).Times(0);
+ SendOnAppPermissionsChangedNotification(kAppId1_, _, _))
+ .Times(0);
EXPECT_CALL(*mock_policy_manager_, GetAppPermissionsChanges(_))
.WillOnce(Return(permissions));
@@ -2242,7 +2244,8 @@ TEST_F(PolicyHandlerTest,
_,
NULL,
_,
- _)).WillOnce(Return(1u));
+ _))
+ .WillOnce(Return(1u));
EXPECT_CALL(app_manager_, application(kConnectionKey_))
.WillOnce(Return(mock_app_));
diff --git a/src/components/application_manager/test/rc_policy_handler_test.cc b/src/components/application_manager/test/rc_policy_handler_test.cc
index b7caf635c9..818a014a3f 100644
--- a/src/components/application_manager/test/rc_policy_handler_test.cc
+++ b/src/components/application_manager/test/rc_policy_handler_test.cc
@@ -30,34 +30,34 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include <fstream>
#include <string>
#include <vector>
-#include <fstream>
#include "gmock/gmock.h"
-#include "application_manager/policies/policy_handler.h"
-#include "application_manager/policies/delegates/app_permission_delegate.h"
-#include "policy/mock_cache_manager.h"
#include "application_manager/mock_message_helper.h"
+#include "application_manager/policies/delegates/app_permission_delegate.h"
+#include "application_manager/policies/policy_handler.h"
#include "connection_handler/mock_connection_handler_settings.h"
-#include "policy/policy_types.h"
-#include "policy/access_remote.h"
#include "json/reader.h"
-#include "json/writer.h"
#include "json/value.h"
+#include "json/writer.h"
+#include "policy/access_remote.h"
+#include "policy/mock_cache_manager.h"
+#include "policy/policy_types.h"
#include "smart_objects/smart_object.h"
-#include "utils/custom_string.h"
-#include "interfaces/MOBILE_API.h"
-#include "policy/mock_policy_settings.h"
#include "application_manager/mock_application.h"
-#include "policy/usage_statistics/mock_statistics_manager.h"
-#include "protocol_handler/mock_session_observer.h"
-#include "connection_handler/mock_connection_handler.h"
#include "application_manager/mock_application_manager.h"
-#include "application_manager/policies/mock_policy_handler_observer.h"
#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/policies/mock_policy_handler_observer.h"
+#include "connection_handler/mock_connection_handler.h"
+#include "interfaces/MOBILE_API.h"
#include "policy/mock_policy_manager.h"
+#include "policy/mock_policy_settings.h"
+#include "policy/usage_statistics/mock_statistics_manager.h"
+#include "protocol_handler/mock_session_observer.h"
+#include "utils/custom_string.h"
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/request_controller/request_controller_test.cc b/src/components/application_manager/test/request_controller/request_controller_test.cc
index 112e3c1c39..71e12b2825 100644
--- a/src/components/application_manager/test/request_controller/request_controller_test.cc
+++ b/src/components/application_manager/test/request_controller/request_controller_test.cc
@@ -32,24 +32,23 @@
#include <stdint.h>
-#include "gtest/gtest.h"
+#include "application_manager/mock_request.h"
#include "application_manager/request_controller.h"
#include "application_manager/request_info.h"
-#include "application_manager/mock_request.h"
+#include "gtest/gtest.h"
-#include "smart_objects/smart_object.h"
+#include "application_manager/application_impl.h"
#include "application_manager/commands/command_request_impl.h"
#include "application_manager/message_helper.h"
-#include "application_manager/application_impl.h"
+#include "smart_objects/smart_object.h"
-#include "application_manager/mock_application_manager.h"
#include "application_manager/event_engine/event_dispatcher.h"
-#include "resumption/last_state.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_request_controller_settings.h"
#include "application_manager/policies/policy_handler.h"
-#include "application_manager/state_controller.h"
#include "application_manager/resumption/resume_ctrl.h"
-#include "application_manager/mock_request_controller_settings.h"
-#include "application_manager/mock_application_manager.h"
+#include "application_manager/state_controller.h"
+#include "resumption/last_state.h"
#include "utils/test_async_waiter.h"
namespace test {
@@ -59,10 +58,10 @@ namespace request_controller_test {
using ::application_manager::request_controller::RequestController;
using ::application_manager::request_controller::RequestInfo;
+using ::testing::_;
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
-using ::testing::NiceMock;
-using ::testing::_;
typedef NiceMock<application_manager_test::MockRequest> MRequest;
typedef std::shared_ptr<MRequest> RequestPtr;
diff --git a/src/components/application_manager/test/request_info_test.cc b/src/components/application_manager/test/request_info_test.cc
index 0abef44e9a..a0b1793cf5 100644
--- a/src/components/application_manager/test/request_info_test.cc
+++ b/src/components/application_manager/test/request_info_test.cc
@@ -31,10 +31,10 @@
*/
#include "application_manager/request_info.h"
-#include "application_manager/mock_request.h"
#include <iostream>
-#include <vector>
#include <limits>
+#include <vector>
+#include "application_manager/mock_request.h"
#include "gmock/gmock.h"
namespace request_info = application_manager::request_controller;
diff --git a/src/components/application_manager/test/request_tracker_test.cc b/src/components/application_manager/test/request_tracker_test.cc
index ee09e0a3e0..9175652da6 100644
--- a/src/components/application_manager/test/request_tracker_test.cc
+++ b/src/components/application_manager/test/request_tracker_test.cc
@@ -30,13 +30,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
-#include "utils/macro.h"
#include "application_manager/request_tracker.h"
#include "application_manager/mock_request_controller_settings.h"
+#include "gtest/gtest.h"
#include "interfaces/MOBILE_API.h"
-#include "utils/lock.h"
#include "utils/conditional_variable.h"
+#include "utils/lock.h"
+#include "utils/macro.h"
namespace test {
namespace components {
@@ -246,6 +246,6 @@ TEST_F(RequestTrackerTestClass,
tracker_.Track(app_id, none_level));
}
-} // namespace request_controller
+} // namespace request_controller_test
} // namespace components
} // namespace test
diff --git a/src/components/application_manager/test/resumption/resume_ctrl_test.cc b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
index 2413421c7f..a82358b451 100644
--- a/src/components/application_manager/test/resumption/resume_ctrl_test.cc
+++ b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
@@ -30,26 +30,26 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string>
#include <algorithm>
+#include <string>
-#include "gtest/gtest.h"
-#include "application_manager/resumption/resume_ctrl_impl.h"
-#include "application_manager/usage_statistics.h"
-#include "application_manager/mock_application.h"
+#include "application_manager/application.h"
+#include "application_manager/application_manager_impl.h"
#include "application_manager/mock_app_extension.h"
+#include "application_manager/mock_application.h"
#include "application_manager/mock_help_prompt_manager.h"
#include "application_manager/mock_resumption_data.h"
+#include "application_manager/resumption/resume_ctrl_impl.h"
+#include "application_manager/usage_statistics.h"
+#include "config_profile/profile.h"
+#include "gtest/gtest.h"
#include "interfaces/MOBILE_API.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/application.h"
#include "utils/data_accessor.h"
-#include "config_profile/profile.h"
-#include "application_manager/mock_message_helper.h"
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_event_dispatcher.h"
+#include "application_manager/mock_message_helper.h"
#include "application_manager/mock_state_controller.h"
namespace test {
@@ -64,10 +64,10 @@ using ::testing::Eq;
using ::testing::Mock;
using ::testing::NiceMock;
using ::testing::Return;
-using ::testing::ReturnRef;
-using ::testing::SetArgReferee;
using ::testing::ReturnPointee;
+using ::testing::ReturnRef;
using ::testing::SaveArg;
+using ::testing::SetArgReferee;
using namespace application_manager_test;
using namespace resumption;
@@ -501,7 +501,8 @@ TEST_F(ResumeCtrlTest, StartResumption_AppWithSubscribeOnButtons) {
EXPECT_CALL(*mock_app_extension_, ProcessResumption(test_subscriptions));
EXPECT_CALL(*application_manager::MockMessageHelper::message_helper_mock(),
- SendAllOnButtonSubscriptionNotificationsForApp(_, _)).Times(2);
+ SendAllOnButtonSubscriptionNotificationsForApp(_, _))
+ .Times(2);
const bool res = res_ctrl_->StartResumption(mock_app_, kHash_);
EXPECT_TRUE(res);
diff --git a/src/components/application_manager/test/resumption/resumption_data_db_test.cc b/src/components/application_manager/test/resumption/resumption_data_db_test.cc
index 8423520b9f..d67c229cc3 100644
--- a/src/components/application_manager/test/resumption/resumption_data_db_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_db_test.cc
@@ -30,30 +30,30 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string>
#include <algorithm>
-#include "gtest/gtest.h"
+#include <string>
#include "application_manager/mock_application.h"
#include "application_manager/mock_application_manager_settings.h"
+#include "gtest/gtest.h"
#include "interfaces/MOBILE_API.h"
#include "utils/sqlite_wrapper/sql_database.h"
#include "utils/sqlite_wrapper/sql_query.h"
-#include "utils/file_system.h"
#include "application_manager/resumption_data_test.h"
#include "application_manager/test_resumption_data_db.h"
+#include "utils/file_system.h"
-#include "application_manager/resumption/resumption_sql_queries.h"
#include "application_manager/resumption/resumption_data_db.h"
+#include "application_manager/resumption/resumption_sql_queries.h"
namespace test {
namespace components {
namespace resumption_test {
+using application_manager_test::MockApplication;
+using ::testing::_;
using ::testing::NiceMock;
using ::testing::ReturnRef;
-using ::testing::_;
-using application_manager_test::MockApplication;
namespace am = application_manager;
using namespace file_system;
@@ -344,7 +344,8 @@ void ResumptionDataDBTest::CheckCharacters(int64_t global_properties_key) {
while (select_characters.Next()) {
std::string character =
(*keyboard_props_)[am::strings::limited_character_list]
- [characters_idx++].asString();
+ [characters_idx++]
+ .asString();
EXPECT_EQ(character, select_characters.GetString(0));
}
}
@@ -392,16 +393,17 @@ void ResumptionDataDBTest::CheckCommandsData() {
++i;
uint cmd = (*test_commands_map[i])[am::strings::cmd_id].asUInt();
EXPECT_EQ(cmd, select_commands.GetUInteger(1));
- std::string name =
- (*test_commands_map[i])[am::strings::menu_params]
- [am::strings::menu_name].asString();
+ std::string name = (*test_commands_map[i])[am::strings::menu_params]
+ [am::strings::menu_name]
+ .asString();
EXPECT_EQ(name, select_commands.GetString(2));
int position = (*test_commands_map[i])[am::strings::menu_params]
- [am::strings::position].asInt();
+ [am::strings::position]
+ .asInt();
EXPECT_EQ(position, select_commands.GetInteger(4));
- int parent_id =
- (*test_commands_map[i])[am::strings::menu_params]
- [am::hmi_request::parent_id].asInt();
+ int parent_id = (*test_commands_map[i])[am::strings::menu_params]
+ [am::hmi_request::parent_id]
+ .asInt();
EXPECT_EQ(parent_id, select_commands.GetInteger(3));
std::string icon_name =
(*test_commands_map[i])[am::strings::cmd_icon][am::strings::value]
@@ -409,7 +411,8 @@ void ResumptionDataDBTest::CheckCommandsData() {
EXPECT_EQ(icon_name, select_commands.GetString(5));
int icon_type = (*test_commands_map[i])[am::strings::cmd_icon]
- [am::strings::image_type].asInt();
+ [am::strings::image_type]
+ .asInt();
EXPECT_EQ(icon_type, select_commands.GetInteger(6));
j = 0;
@@ -461,12 +464,12 @@ void ResumptionDataDBTest::CheckChoiceSetData() {
std::string menu_name =
command[am::strings::choice_set][choice_idx][am::strings::menu_name]
.asString();
- std::string secondary_text =
- command[am::strings::choice_set][choice_idx]
- [am::strings::secondary_text].asString();
- std::string tertiary_text =
- command[am::strings::choice_set][choice_idx]
- [am::strings::tertiary_text].asString();
+ std::string secondary_text = command[am::strings::choice_set][choice_idx]
+ [am::strings::secondary_text]
+ .asString();
+ std::string tertiary_text = command[am::strings::choice_set][choice_idx]
+ [am::strings::tertiary_text]
+ .asString();
EXPECT_EQ(choice_id, select_choice_set.GetInteger(4));
EXPECT_EQ(menu_name, select_choice_set.GetString(5));
@@ -478,12 +481,12 @@ void ResumptionDataDBTest::CheckChoiceSetData() {
EXPECT_TRUE(select_image.Prepare(kSelectImage));
select_image.Bind(0, select_choice_set.GetLongInt(8));
EXPECT_TRUE(select_image.Exec());
- std::string image_value =
- command[am::strings::choice_set][choice_idx][am::strings::image]
- [am::strings::value].asString();
- int image_type =
- command[am::strings::choice_set][choice_idx][am::strings::image]
- [am::strings::image_type].asInt();
+ std::string image_value = command[am::strings::choice_set][choice_idx]
+ [am::strings::image][am::strings::value]
+ .asString();
+ int image_type = command[am::strings::choice_set][choice_idx]
+ [am::strings::image][am::strings::image_type]
+ .asInt();
EXPECT_EQ(image_value, select_image.GetString(1));
EXPECT_EQ(image_type, select_image.GetInteger(0));
@@ -491,9 +494,9 @@ void ResumptionDataDBTest::CheckChoiceSetData() {
EXPECT_TRUE(select_image.Prepare(kSelectImage));
select_image.Bind(0, select_choice_set.GetLongInt(9));
EXPECT_TRUE(select_image.Exec());
- image_value =
- command[am::strings::choice_set][choice_idx]
- [am::strings::secondary_image][am::strings::value].asString();
+ image_value = command[am::strings::choice_set][choice_idx]
+ [am::strings::secondary_image][am::strings::value]
+ .asString();
image_type =
command[am::strings::choice_set][choice_idx]
[am::strings::secondary_image][am::strings::image_type]
@@ -503,9 +506,9 @@ void ResumptionDataDBTest::CheckChoiceSetData() {
vr_cmd_idx = 0;
}
- std::string vr_comm =
- command[am::strings::choice_set][choice_idx][am::strings::vr_commands]
- [vr_cmd_idx++].asString();
+ std::string vr_comm = command[am::strings::choice_set][choice_idx]
+ [am::strings::vr_commands][vr_cmd_idx++]
+ .asString();
EXPECT_EQ(vr_comm, select_choice_set.GetString(10));
}
}
diff --git a/src/components/application_manager/test/resumption/resumption_data_json_test.cc b/src/components/application_manager/test/resumption/resumption_data_json_test.cc
index 40e61a3c53..955309e091 100644
--- a/src/components/application_manager/test/resumption/resumption_data_json_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_json_test.cc
@@ -30,13 +30,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string>
#include <algorithm>
+#include <string>
#include "gtest/gtest.h"
-#include "application_manager/usage_statistics.h"
#include "application_manager/mock_application.h"
#include "application_manager/mock_resumption_data.h"
+#include "application_manager/usage_statistics.h"
#include "interfaces/MOBILE_API.h"
#include "resumption/last_state_impl.h"
@@ -51,9 +51,9 @@ namespace components {
namespace resumption_test {
using ::testing::_;
+using ::testing::NiceMock;
using ::testing::Return;
using ::testing::ReturnRef;
-using ::testing::NiceMock;
namespace am = application_manager;
using namespace Json;
diff --git a/src/components/application_manager/test/resumption/resumption_data_test.cc b/src/components/application_manager/test/resumption/resumption_data_test.cc
index fe24ea39b6..29718b631c 100644
--- a/src/components/application_manager/test/resumption/resumption_data_test.cc
+++ b/src/components/application_manager/test/resumption/resumption_data_test.cc
@@ -30,16 +30,16 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string>
#include <algorithm>
+#include <string>
#include "gtest/gtest.h"
-#include "application_manager/usage_statistics.h"
+#include "application_manager/application.h"
+#include "application_manager/message_helper.h"
#include "application_manager/mock_resumption_data.h"
+#include "application_manager/usage_statistics.h"
#include "utils/custom_string.h"
-#include "application_manager/application.h"
#include "utils/data_accessor.h"
-#include "application_manager/message_helper.h"
#include "application_manager/resumption_data_test.h"
@@ -47,10 +47,10 @@ namespace test {
namespace components {
namespace resumption_test {
namespace custom_str = utils::custom_string;
+using ::testing::_;
using ::testing::Return;
-using ::testing::ReturnRef;
using ::testing::ReturnPointee;
-using ::testing::_;
+using ::testing::ReturnRef;
void ResumptionDataTest::CheckSavedApp(sm::SmartObject& resume_app_list) {
EXPECT_EQ(policy_app_id_, resume_app_list[am::strings::app_id].asString());
@@ -79,9 +79,9 @@ void ResumptionDataTest::CheckSavedApp(sm::SmartObject& resume_app_list) {
void ResumptionDataTest::CheckCommands(sm::SmartObject& res_list) {
for (uint32_t i = 0; i < kCountOfCommands_; ++i) {
EXPECT_EQ(i, res_list[i][am::strings::cmd_id].asUInt());
- std::string name =
- (*test_commands_map[i])[am::strings::menu_params]
- [am::strings::menu_name].asString();
+ std::string name = (*test_commands_map[i])[am::strings::menu_params]
+ [am::strings::menu_name]
+ .asString();
EXPECT_EQ(name,
res_list[i][am::strings::menu_params][am::strings::menu_name]
.asString());
@@ -93,7 +93,8 @@ void ResumptionDataTest::CheckCommands(sm::SmartObject& res_list) {
res_list[i][am::strings::menu_params][am::strings::position].asInt());
int parent_id = (*test_commands_map[i])[am::strings::menu_params]
- [am::hmi_request::parent_id].asInt();
+ [am::hmi_request::parent_id]
+ .asInt();
EXPECT_EQ(parent_id,
res_list[i][am::strings::menu_params][am::hmi_request::parent_id]
.asInt());
@@ -150,20 +151,24 @@ void ResumptionDataTest::CheckChoiceSet(sm::SmartObject& res_list) {
std::snprintf(numb, 12, "%d", i + j);
std::string test_choice =
(*test_choiceset_map[i])[am::strings::choice_set][j]
- [am::strings::vr_commands][0].asString();
+ [am::strings::vr_commands][0]
+ .asString();
EXPECT_EQ(test_choice, command[am::strings::vr_commands][0].asString());
std::string menu_name =
(*test_choiceset_map[i])[am::strings::choice_set][j]
- [am::strings::menu_name].asString();
+ [am::strings::menu_name]
+ .asString();
EXPECT_EQ(menu_name, command[am::strings::menu_name].asString());
std::string secondary_text =
(*test_choiceset_map[i])[am::strings::choice_set][j]
- [am::strings::secondary_text].asString();
+ [am::strings::secondary_text]
+ .asString();
EXPECT_EQ(secondary_text,
command[am::strings::secondary_text].asString());
std::string tertiary_text =
(*test_choiceset_map[i])[am::strings::choice_set][j]
- [am::strings::tertiary_text].asString();
+ [am::strings::tertiary_text]
+ .asString();
EXPECT_EQ(tertiary_text, command[am::strings::tertiary_text].asString());
std::string image_value =
@@ -181,13 +186,15 @@ void ResumptionDataTest::CheckChoiceSet(sm::SmartObject& res_list) {
image_value = (*test_choiceset_map[i])[am::strings::choice_set][j]
[am::strings::secondary_image]
- [am::strings::value].asString();
+ [am::strings::value]
+ .asString();
EXPECT_EQ(
image_value,
command[am::strings::secondary_image][am::strings::value].asString());
image_type = (*test_choiceset_map[i])[am::strings::choice_set][j]
[am::strings::secondary_image]
- [am::strings::image_type].asInt();
+ [am::strings::image_type]
+ .asInt();
EXPECT_EQ(image_type,
command[am::strings::secondary_image][am::strings::image_type]
.asInt());
diff --git a/src/components/application_manager/test/resumption_sql_queries_test.cc b/src/components/application_manager/test/resumption_sql_queries_test.cc
index 0ec902085f..61490ae4af 100644
--- a/src/components/application_manager/test/resumption_sql_queries_test.cc
+++ b/src/components/application_manager/test/resumption_sql_queries_test.cc
@@ -31,17 +31,17 @@
*/
#include <algorithm>
-#include <vector>
-#include <string>
#include <sstream>
+#include <string>
#include <utility>
+#include <vector>
#include "gtest/gtest.h"
-#include "utils/sqlite_wrapper/sql_database.h"
-#include "utils/sqlite_wrapper/sql_query.h"
-#include "utils/file_system.h"
#include "application_manager/resumption/resumption_sql_queries.h"
#include "policy/sql_pt_queries.h"
+#include "utils/file_system.h"
+#include "utils/sqlite_wrapper/sql_database.h"
+#include "utils/sqlite_wrapper/sql_query.h"
namespace test {
namespace components {
@@ -49,8 +49,8 @@ namespace resumption_test {
using namespace ::resumption;
-using std::string;
using std::pair;
+using std::string;
using utils::dbms::SQLDatabase;
using utils::dbms::SQLQuery;
@@ -808,7 +808,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountHMILevel_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -838,7 +839,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectHMILevel_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -866,7 +868,8 @@ TEST_F(ResumptionSqlQueriesTest, kCheckHMIId_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -894,7 +897,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectHMIId_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -922,7 +926,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountHMIId_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -951,7 +956,8 @@ TEST_F(ResumptionSqlQueriesTest, kCountHashId_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -980,7 +986,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectHashId_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1017,7 +1024,8 @@ TEST_F(ResumptionSqlQueriesTest, kCheckApplication_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1045,7 +1053,8 @@ TEST_F(ResumptionSqlQueriesTest, kCountApplications_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1091,7 +1100,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1122,7 +1132,8 @@ TEST_F(ResumptionSqlQueriesTest, kUpdateHMILevel_ExpectDataUpdated) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1158,7 +1169,8 @@ TEST_F(ResumptionSqlQueriesTest, kUpdateIgnOffCount_ExpectDataUpdated) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1192,7 +1204,8 @@ TEST_F(ResumptionSqlQueriesTest, kCountApplicationsIgnOff_ExpectDataCorrect) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1236,7 +1249,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1279,7 +1293,8 @@ TEST_F(ResumptionSqlQueriesTest, kUpdateSuspendData_ExpectDataUpdated) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1311,7 +1326,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteFile_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key1 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1326,7 +1342,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteFile_ExpectDataDeleted) {
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
int64_t key2 =
FillFileTable(temp_query, 1, true, true, "tst_name").LastInsertId();
FillApplicationFilesArrayTable(temp_query, key1, key2);
@@ -1344,7 +1361,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key1 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1359,7 +1377,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
int64_t key2 =
FillFileTable(temp_query, 1, true, true, "tst_name").LastInsertId();
FillApplicationFilesArrayTable(temp_query, key1, key2);
@@ -1383,7 +1402,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteSubMenu_ExpectDataDeleted) {
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1398,7 +1418,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteSubMenu_ExpectDataDeleted) {
false,
app_id2,
device_id,
- key).LastInsertId();
+ key)
+ .LastInsertId();
int64_t submenu_key =
FillSubMenuTable(temp_query, 1, "tst_menuName", 2).LastInsertId();
@@ -1417,7 +1438,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key)
.LastInsertId();
@@ -1432,7 +1454,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id2,
device_id,
- key).LastInsertId();
+ key)
+ .LastInsertId();
int64_t submenu_key =
FillSubMenuTable(temp_query, 1, "tst_menuName", 2).LastInsertId();
@@ -1454,7 +1477,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
key1 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1469,7 +1493,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
int64_t key2 =
FillFileTable(temp_query, 1, true, true, "tst_name").LastInsertId();
key1 = FillApplicationFilesArrayTable(temp_query, key1, key2).LastInsertId();
@@ -1494,7 +1519,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteImageFromCommands_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
key1 = FillGlobalPropertiesTable(
@@ -1511,7 +1537,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteImageFromCommands_ExpectDataDeleted) {
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
FillApplicationCommandsArrayTable(temp_query, key1, key2);
// Check before action
const std::string select_count_image = "SELECT COUNT(*) FROM image;";
@@ -1527,7 +1554,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteVrCommands_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
key1 = FillGlobalPropertiesTable(
@@ -1544,7 +1572,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteVrCommands_ExpectDataDeleted) {
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
FillVRCommandsArrayTable(
temp_query, "tst_vr_command", kVRCommandFromCommand, key2);
@@ -1564,7 +1593,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteCommands_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
@@ -1582,7 +1612,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteCommands_ExpectDataDeleted) {
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
FillApplicationCommandsArrayTable(temp_query, key1, key2);
// Check
@@ -1599,7 +1630,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillCommandTable(temp_query, 1, "tst_menu_name", 1, 2, key1)
.LastInsertId();
@@ -1617,7 +1649,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
FillApplicationCommandsArrayTable(temp_query, key1, key2);
// Check
@@ -1640,13 +1673,15 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteImageFromChoiceSet_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillChoiceTable(temp_query,
2,
"tst_menu_name",
"secondary_txt",
"tst_tert_text",
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
int64_t key3 = FillApplicationTable(temp_query,
connection_key,
grammarID,
@@ -1658,7 +1693,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteImageFromChoiceSet_ExpectDataDeleted) {
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
int64_t key4 = FillApplicationChoiceSetTable(temp_query, 1, 2).LastInsertId();
FillChoiceArrayTable(temp_query, key4, key2);
FillApplicationChoiceSetArrayTable(temp_query, key4, key3);
@@ -1678,7 +1714,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 =
FillChoiceTable(
temp_query, 1, "tst_menu_name", "second_text", "tert_txt", key1)
@@ -1694,7 +1731,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
FillVRCommandsArrayTable(
temp_query, "tst_vr_command", kVRCommandFromChoice, key2);
@@ -1724,7 +1762,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteChoice_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 =
FillChoiceTable(
temp_query, 1, "tst_menu_name", "second_text", "tert_txt", key1)
@@ -1740,7 +1779,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteChoice_ExpectDataDeleted) {
false,
app_id2,
device_id,
- key1).LastInsertId();
+ key1)
+ .LastInsertId();
int64_t key3 = FillApplicationChoiceSetTable(temp_query, 1, 2).LastInsertId();
FillChoiceArrayTable(temp_query, key3, key2);
FillApplicationChoiceSetArrayTable(temp_query, key3, key1);
@@ -1773,7 +1813,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteChoiceArray_ExpectDataDeleted) {
false,
app_id2,
device_id,
- 1).LastInsertId();
+ 1)
+ .LastInsertId();
FillApplicationChoiceSetArrayTable(
temp_query, application_choiceset_table_key, application_table_key);
FillChoiceArrayTable(
@@ -1803,7 +1844,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id2,
device_id,
- 1).LastInsertId();
+ 1)
+ .LastInsertId();
int64_t key2 = FillApplicationChoiceSetTable(temp_query, 1, 2).LastInsertId();
FillApplicationChoiceSetArrayTable(temp_query, key2, key1);
@@ -1838,7 +1880,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id2,
device_id,
- 1).LastInsertId();
+ 1)
+ .LastInsertId();
int64_t key2 = FillApplicationChoiceSetTable(temp_query, 1, 2).LastInsertId();
FillApplicationChoiceSetArrayTable(temp_query, key2, key1);
@@ -1864,7 +1907,8 @@ TEST_F(ResumptionSqlQueriesTest,
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1896,7 +1940,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeletevrHelpItem_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1929,7 +1974,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeletevrHelpItemArray_ExpectDataDeleted) {
int64_t key1 = FillImageTable(temp_query,
/*image_type=*/1,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t key2 = FillGlobalPropertiesTable(
temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", key1)
.LastInsertId();
@@ -1963,9 +2009,9 @@ TEST_F(ResumptionSqlQueriesTest,
string character_list = "abcdefghij";
int64_t key1 = FillTableLimitedCharacterListTable(temp_query, character_list)
.LastInsertId();
- int64_t key2 =
- FillGlobalPropertiesTable(
- temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0).LastInsertId();
+ int64_t key2 = FillGlobalPropertiesTable(
+ temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0)
+ .LastInsertId();
FillApplicationTable(temp_query,
connection_key,
grammarID,
@@ -1999,9 +2045,9 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteCharacterArray_ExpectDataDeleted) {
string character_list = "abcdefghij";
int64_t key1 = FillTableLimitedCharacterListTable(temp_query, character_list)
.LastInsertId();
- int64_t key2 =
- FillGlobalPropertiesTable(
- temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0).LastInsertId();
+ int64_t key2 = FillGlobalPropertiesTable(
+ temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0)
+ .LastInsertId();
FillApplicationTable(temp_query,
connection_key,
grammarID,
@@ -2031,7 +2077,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteTTSChunk_ExpectDataDeleted) {
FillTTSChunkTable(temp_query, 1, "tst_text").LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
- temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0).LastInsertId();
+ temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0)
+ .LastInsertId();
FillApplicationTable(temp_query,
connection_key,
@@ -2087,7 +2134,8 @@ TEST_F(ResumptionSqlQueriesTest,
FillTTSChunkTable(temp_query, 1, "tst_text").LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
- temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0).LastInsertId();
+ temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0)
+ .LastInsertId();
FillApplicationTable(temp_query,
connection_key,
grammarID,
@@ -2121,7 +2169,8 @@ TEST_F(ResumptionSqlQueriesTest, kDeleteGlobalProperties_ExpectDataDeleted) {
SQLQuery temp_query(db());
int64_t glob_prop_key =
FillGlobalPropertiesTable(
- temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0).LastInsertId();
+ temp_query, "vrHelp", "menuTitle", 1, 1, 2, "auto", 0)
+ .LastInsertId();
FillApplicationTable(temp_query,
connection_key,
grammarID,
@@ -2160,7 +2209,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectPrimaryKeyImage_ExpectDataCorrect) {
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
"tst_image",
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
ValToPosPair p1(0, "tst_image");
ValToPosPair p2(1, "");
// Check
@@ -2588,7 +2638,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountFiles_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t file_key =
FillFileTable(temp_query, 1, true, true, "tst_name").LastInsertId();
FillApplicationFilesArrayTable(temp_query, app_key, file_key);
@@ -2613,7 +2664,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectFiles_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t file_key =
FillFileTable(temp_query, 1, true, true, "tst_name").LastInsertId();
FillApplicationFilesArrayTable(temp_query, app_key, file_key);
@@ -2640,7 +2692,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountSubMenu_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t submenu_key =
FillSubMenuTable(temp_query, 1, "menu_name", 1).LastInsertId();
FillApplicationSubMenuArrayTable(temp_query, app_key, submenu_key);
@@ -2664,7 +2717,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectSubMenu_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t submenu_key =
FillSubMenuTable(temp_query, 1, "menu_name", 1).LastInsertId();
@@ -2691,7 +2745,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountCommands_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t command_key =
FillCommandTable(temp_query, 1, "menu_name", 1, 2, 5).LastInsertId();
FillApplicationCommandsArrayTable(temp_query, app_key, command_key);
@@ -2715,11 +2770,13 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCommandsFromCommand_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
"tst_image",
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
FillChoiceTable(
temp_query, 1, "menu_name", "sec_text", "tert_text", image_key)
@@ -2758,11 +2815,13 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCommandsFromChoice_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
"tst_image",
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t choice_key =
FillChoiceTable(
@@ -2814,7 +2873,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountSubscriptions_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
FillAppSubscriptionsArrayTable(temp_query, 2, 3, app_key);
ValToPosPair p1(0, app_id1);
ValToPosPair p2(1, device_id);
@@ -2836,7 +2896,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectSubscriptions_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
FillAppSubscriptionsArrayTable(temp_query, 2, 3, app_key);
ValToPosPair p1(0, app_id1);
ValToPosPair p2(1, device_id);
@@ -2859,7 +2920,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCountChoiceSet_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
FillApplicationChoiceSetArrayTable(temp_query, 2, app_key);
ValToPosPair p1(0, app_id1);
ValToPosPair p2(1, device_id);
@@ -2881,11 +2943,13 @@ TEST_F(ResumptionSqlQueriesTest, kSelectChoiceSets_ExpectDataCorrect) {
false,
app_id1,
device_id,
- 9).LastInsertId();
+ 9)
+ .LastInsertId();
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
"tst_image",
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t choice_key =
FillChoiceTable(
temp_query, 1, "menu_name", "sec_text", "tert_text", image_key)
@@ -2920,7 +2984,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectImage_ExpectDataCorrect) {
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
"tst_image",
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
// Check
ValToPosPair p1(0, IntToString(image_key));
ValToPosPair p2(1, "");
@@ -2947,7 +3012,8 @@ TEST_F(ResumptionSqlQueriesTest,
false,
app_id1,
device_id,
- glob_prop_key).LastInsertId();
+ glob_prop_key)
+ .LastInsertId();
// Check
ValToPosPair p1(0, app_id1);
@@ -2961,7 +3027,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectGlobalProperties_ExpectDataCorrect) {
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
test_image,
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", image_key)
@@ -2977,7 +3044,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectGlobalProperties_ExpectDataCorrect) {
false,
app_id1,
device_id,
- glob_prop_key).LastInsertId();
+ glob_prop_key)
+ .LastInsertId();
FillHelpTimeoutPromptArrayTable(temp_query, glob_prop_key, 3, 7);
// Check
@@ -3001,7 +3069,8 @@ TEST_F(ResumptionSqlQueriesTest, kChecksVrHelpItem_ExpectDataCorrect) {
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
"tst_image",
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", image_key)
@@ -3021,7 +3090,8 @@ TEST_F(ResumptionSqlQueriesTest, kSelectVrHelpItem_ExpectDataCorrect) {
int64_t image_key = FillImageTable(temp_query,
/*image_type=*/2,
"tst_image",
- /*is_template=*/true).LastInsertId();
+ /*is_template=*/true)
+ .LastInsertId();
int64_t glob_prop_key =
FillGlobalPropertiesTable(
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", image_key)
@@ -3046,8 +3116,9 @@ TEST_F(ResumptionSqlQueriesTest, kChecksCharacter_ExpectDataCorrect) {
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", 2)
.LastInsertId();
string character_list = "abcdefghijkl";
- int64_t lim_char_list_key = FillTableLimitedCharacterListTable(
- temp_query, character_list).LastInsertId();
+ int64_t lim_char_list_key =
+ FillTableLimitedCharacterListTable(temp_query, character_list)
+ .LastInsertId();
FillCharacterArrayTable(temp_query, glob_prop_key, lim_char_list_key);
// Check
ValToPosPair p1(0, IntToString(glob_prop_key));
@@ -3063,8 +3134,9 @@ TEST_F(ResumptionSqlQueriesTest, kSelectCharacter_ExpectDataCorrect) {
temp_query, "tst_vr_title", "tst_menu", 2, 3, 3, "auto", 2)
.LastInsertId();
string character_list = "abcdefghijkl";
- int64_t lim_char_list_key = FillTableLimitedCharacterListTable(
- temp_query, character_list).LastInsertId();
+ int64_t lim_char_list_key =
+ FillTableLimitedCharacterListTable(temp_query, character_list)
+ .LastInsertId();
FillCharacterArrayTable(temp_query, glob_prop_key, lim_char_list_key);
// Check
ValToPosPair p1(0, IntToString(glob_prop_key));
diff --git a/src/components/application_manager/test/state_controller/state_controller_test.cc b/src/components/application_manager/test/state_controller/state_controller_test.cc
index 9574f8d00f..fbada47fec 100644
--- a/src/components/application_manager/test/state_controller/state_controller_test.cc
+++ b/src/components/application_manager/test/state_controller/state_controller_test.cc
@@ -30,46 +30,46 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include "gtest/gtest.h"
+#include "application_manager/application_manager_impl.h"
#include "application_manager/hmi_state.h"
+#include "application_manager/mock_application.h"
#include "application_manager/state_controller_impl.h"
#include "application_manager/usage_statistics.h"
-#include "application_manager/application_manager_impl.h"
-#include "application_manager/mock_application.h"
-#include "connection_handler/mock_connection_handler_settings.h"
#include "connection_handler/connection_handler_impl.h"
+#include "connection_handler/mock_connection_handler_settings.h"
+#include "gtest/gtest.h"
#include "transport_manager/mock_transport_manager.h"
-#include "utils/lock.h"
#include "utils/data_accessor.h"
+#include "utils/lock.h"
-#include "application_manager/message_helper.h"
#include "application_manager/event_engine/event.h"
-#include "application_manager/smart_object_keys.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/mock_application_manager.h"
+#include "application_manager/mock_event_dispatcher.h"
#include "application_manager/mock_message_helper.h"
+#include "application_manager/mock_rpc_service.h"
+#include "application_manager/policies/mock_policy_handler_interface.h"
+#include "application_manager/resumption/resume_ctrl.h"
+#include "application_manager/smart_object_keys.h"
+#include "connection_handler/mock_connection_handler.h"
#include "policy/mock_policy_settings.h"
#include "policy/usage_statistics/mock_statistics_manager.h"
#include "protocol_handler/mock_session_observer.h"
-#include "connection_handler/mock_connection_handler.h"
-#include "application_manager/policies/mock_policy_handler_interface.h"
-#include "application_manager/mock_event_dispatcher.h"
-#include "application_manager/resumption/resume_ctrl.h"
-#include "application_manager/mock_application_manager.h"
-#include "application_manager/mock_rpc_service.h"
namespace am = application_manager;
using am::HmiState;
using am::HmiStatePtr;
using am::UsageStatistics;
using ::testing::_;
+using ::testing::AtLeast;
+using ::testing::InSequence;
+using ::testing::Mock;
+using ::testing::NiceMock;
using ::testing::Return;
-using ::testing::ReturnRef;
using ::testing::ReturnPointee;
+using ::testing::ReturnRef;
using ::testing::SaveArg;
-using ::testing::Mock;
-using ::testing::NiceMock;
-using ::testing::InSequence;
using ::testing::Truly;
-using ::testing::AtLeast;
namespace test {
namespace components {
@@ -2063,7 +2063,8 @@ TEST_F(StateControllerImplTest, SendEventBCActivateApp_HMIReceivesError) {
EXPECT_CALL(app_manager_mock_, SendHMIStatusNotification(simple_app_))
.Times(0);
EXPECT_CALL(app_manager_mock_,
- OnHMILevelChanged(simple_app_->app_id(), _, _)).Times(0);
+ OnHMILevelChanged(simple_app_->app_id(), _, _))
+ .Times(0);
smart_objects::SmartObject message;
message[am::strings::params][am::hmi_response::code] = *it;
@@ -2627,7 +2628,8 @@ TEST_F(StateControllerImplTest, SetRegularStateMediaToNonMediaApp_VR_Stopped) {
EXPECT_CALL(*simple_app_ptr_, is_resuming()).WillRepeatedly(Return(false));
EXPECT_CALL(message_helper_mock_,
- SendOnResumeAudioSourceToHMI(simple_app_id_, _)).Times(0);
+ SendOnResumeAudioSourceToHMI(simple_app_id_, _))
+ .Times(0);
EXPECT_CALL(*simple_app_ptr_,
SetPostponedState(Truly(HmiStatesComparator(check_state))))
.Times(0);
diff --git a/src/components/application_manager/test/usage_statistics_test.cc b/src/components/application_manager/test/usage_statistics_test.cc
index dfc694f3c5..b494afb68e 100644
--- a/src/components/application_manager/test/usage_statistics_test.cc
+++ b/src/components/application_manager/test/usage_statistics_test.cc
@@ -33,9 +33,9 @@
#include "application_manager/usage_statistics.h"
#include <memory>
#include "gmock/gmock.h"
-#include "smart_objects/enum_schema_item.h"
-#include "policy/usage_statistics/mock_statistics_manager.h"
#include "policy/usage_statistics/mock_app_stopwatch.h"
+#include "policy/usage_statistics/mock_statistics_manager.h"
+#include "smart_objects/enum_schema_item.h"
namespace test {
namespace components {
diff --git a/src/components/application_manager/test/zero_request_amount_test.cc b/src/components/application_manager/test/zero_request_amount_test.cc
index 640a186e2b..0166c036c1 100644
--- a/src/components/application_manager/test/zero_request_amount_test.cc
+++ b/src/components/application_manager/test/zero_request_amount_test.cc
@@ -30,19 +30,19 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <string>
#include <algorithm>
+#include <string>
#include "gtest/gtest.h"
-#include "application_manager/request_controller.h"
-#include "application_manager/commands/command_request_impl.h"
#include "application_manager/application_manager_impl.h"
-#include "application_manager/message_helper.h"
+#include "application_manager/commands/command_request_impl.h"
#include "application_manager/commands/mobile/put_file_request.h"
#include "application_manager/commands/mobile/register_app_interface_request.h"
#include "application_manager/commands/mobile/unregister_app_interface_request.h"
-#include "smart_objects/smart_object.h"
+#include "application_manager/message_helper.h"
+#include "application_manager/request_controller.h"
#include "interfaces/MOBILE_API.h"
+#include "smart_objects/smart_object.h"
namespace test {
namespace components {