From ac86aa9a064bce07c5cec933fb27dfd9f92c7bc0 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 16 Jun 2018 19:45:29 +0300 Subject: Replace all of application SubscribeToIVI to app extension subscribeToVehicleInfo --- src/components/application_manager/test/application_helper_test.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index a0b6fd6aa2..620aad0f0b 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -147,7 +147,7 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) { app_impl_->AddCommand(cmd_id, cmd[strings::msg_params]); app_impl_->AddSubMenu(menu_id, cmd[strings::menu_params]); app_impl_->AddChoiceSet(choice_set_id, cmd[strings::msg_params]); - EXPECT_TRUE(app_impl_->SubscribeToIVI(static_cast(vi))); + EXPECT_TRUE(app_impl_->SubscribeToButton(button)); const std::string some_string = "some_string"; @@ -230,8 +230,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectHMICleanupRequests) { app_impl_->AddCommand(cmd_id, cmd[strings::msg_params]); app_impl_->AddSubMenu(menu_id, cmd[strings::menu_params]); app_impl_->AddChoiceSet(choice_set_id, cmd[strings::msg_params]); - app_impl_->SubscribeToIVI(static_cast( - mobile_apis::VehicleDataType::VEHICLEDATA_ACCPEDAL)); app_impl_->SubscribeToButton(mobile_apis::ButtonName::AC); EXPECT_CALL(*mock_message_helper_, SendUnsubscribedWayPoints(_)); -- cgit v1.2.1 From fb5f5edd793ebe353c91df91950f76816b5f200c Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 16 Jun 2018 20:44:20 +0300 Subject: Move using functions for clear subscriptions to plugin --- src/components/application_manager/test/application_helper_test.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index 620aad0f0b..b27ed57872 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -245,8 +245,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectHMICleanupRequests) { EXPECT_CALL(*mock_message_helper_, SendUnsubscribeButtonNotification(_, _, _)); - EXPECT_CALL(*mock_message_helper_, SendUnsubscribeIVIRequest(_, _, _)); - // Act application_manager::DeleteApplicationData(app_impl_, app_manager_impl_); } -- cgit v1.2.1 From 88a170ad527e44038f2e219216ae1d4a80c39b0c Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 18 Jun 2018 11:42:07 +0300 Subject: fixup! Move IsSubsscrbedTo to plugin --- src/components/application_manager/test/application_helper_test.cc | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index b27ed57872..25cd13fcad 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -172,8 +172,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) { EXPECT_TRUE(NULL != app_impl_->FindCommand(cmd_id)); EXPECT_TRUE(NULL != app_impl_->FindSubMenu(menu_id)); EXPECT_TRUE(NULL != app_impl_->FindChoiceSet(choice_set_id)); - EXPECT_TRUE(app_impl_->IsSubscribedToButton(button)); - EXPECT_TRUE(app_impl_->IsSubscribedToIVI(static_cast(vi))); auto help_prompt = app_impl_->help_prompt(); EXPECT_TRUE(help_prompt->asString() == some_string); auto timeout_prompt = app_impl_->timeout_prompt(); @@ -198,7 +196,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) { EXPECT_FALSE(NULL != app_impl_->FindSubMenu(menu_id)); EXPECT_FALSE(NULL != app_impl_->FindChoiceSet(choice_set_id)); EXPECT_FALSE(app_impl_->IsSubscribedToButton(button)); - EXPECT_FALSE(app_impl_->IsSubscribedToIVI(static_cast(vi))); help_prompt = app_impl_->help_prompt(); EXPECT_FALSE(help_prompt->asString() == some_string); timeout_prompt = app_impl_->timeout_prompt(); -- cgit v1.2.1 From a1518a9e555c040aead43b54826dec399ea720e4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 18 Jun 2018 12:10:33 +0300 Subject: fixup! Remove all usage of SubscribedIVI from application manager --- src/components/application_manager/test/application_helper_test.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index 25cd13fcad..70772140c4 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -134,8 +134,6 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) { const uint32_t cmd_id = 1; const uint32_t menu_id = 2; const uint32_t choice_set_id = 3; - const mobile_apis::VehicleDataType::eType vi = - mobile_apis::VehicleDataType::VEHICLEDATA_ACCPEDAL; const mobile_apis::ButtonName::eType button = mobile_apis::ButtonName::AC; smart_objects::SmartObject cmd; -- cgit v1.2.1 From 7c0e630ed2e2b5f926adfdc9ddb46585bb2985b0 Mon Sep 17 00:00:00 2001 From: BSolonenko Date: Mon, 18 Jun 2018 16:57:59 +0300 Subject: Fix unit tests Fixed the following unit tests: - ApplicationHelperTest - ResumptionDataDBTest --- .../application_manager/test/application_helper_test.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index 70772140c4..eb1e30c928 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -52,6 +52,8 @@ #include "utils/macro.h" #include "utils/shared_ptr.h" #include "utils/make_shared.h" +#include "test/resumption/mock_last_state.h" +#include "media_manager/mock_media_manager.h" namespace { const uint8_t expected_tread_pool_size = 2u; @@ -69,6 +71,8 @@ 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; @@ -112,6 +116,12 @@ class ApplicationHelperTest : public testing::Test { const connection_handler::DeviceHandle device_id = 1; const custom_str::CustomString app_name(""); + + const std::string path_to_plagin = ""; + EXPECT_CALL(mock_application_manager_settings_, plugins_folder()) + .WillOnce(ReturnRef(path_to_plagin)); + app_manager_impl_.Init(mock_last_state_, &mock_media_manager_); + app_impl_ = new ApplicationImpl( application_id, policy_app_id, @@ -127,6 +137,8 @@ class ApplicationHelperTest : public testing::Test { NiceMock mock_policy_settings_; ApplicationManagerImpl app_manager_impl_; + MockMediaManager mock_media_manager_; + MockLastState mock_last_state_; ApplicationSharedPtr app_impl_; }; @@ -170,6 +182,7 @@ TEST_F(ApplicationHelperTest, RecallApplicationData_ExpectAppDataReset) { EXPECT_TRUE(NULL != app_impl_->FindCommand(cmd_id)); EXPECT_TRUE(NULL != app_impl_->FindSubMenu(menu_id)); EXPECT_TRUE(NULL != app_impl_->FindChoiceSet(choice_set_id)); + EXPECT_TRUE(app_impl_->IsSubscribedToButton(button)); auto help_prompt = app_impl_->help_prompt(); EXPECT_TRUE(help_prompt->asString() == some_string); auto timeout_prompt = app_impl_->timeout_prompt(); -- cgit v1.2.1 From 22d3d2e92cb084d4987e52f148b1328e7a843952 Mon Sep 17 00:00:00 2001 From: "Ira Lytvynenko (GitHub)" Date: Thu, 21 Jun 2018 13:53:13 +0300 Subject: Move new RPCs to sdl_rpc_plugin and make some fixes after rebase --- src/components/application_manager/test/application_helper_test.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index eb1e30c928..c9a8fd2da4 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -116,7 +116,6 @@ class ApplicationHelperTest : public testing::Test { const connection_handler::DeviceHandle device_id = 1; const custom_str::CustomString app_name(""); - const std::string path_to_plagin = ""; EXPECT_CALL(mock_application_manager_settings_, plugins_folder()) .WillOnce(ReturnRef(path_to_plagin)); -- cgit v1.2.1 From 5019af50b9a2236dd75e630aae5b82e440be9620 Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Wed, 18 Jul 2018 11:13:50 -0400 Subject: Replace utils::SharedPtr with std::shared_ptr, remove non-standard usage --- .../application_manager/test/application_helper_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index c9a8fd2da4..e84dc5f7be 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -50,8 +50,8 @@ #include "smart_objects/smart_object.h" #include "utils/custom_string.h" #include "utils/macro.h" -#include "utils/shared_ptr.h" -#include "utils/make_shared.h" + + #include "test/resumption/mock_last_state.h" #include "media_manager/mock_media_manager.h" @@ -121,13 +121,13 @@ class ApplicationHelperTest : public testing::Test { .WillOnce(ReturnRef(path_to_plagin)); app_manager_impl_.Init(mock_last_state_, &mock_media_manager_); - app_impl_ = new ApplicationImpl( + app_impl_ = std::make_shared( application_id, policy_app_id, mac_address, device_id, app_name, - utils::MakeShared(), + std::make_shared(), app_manager_impl_); } -- cgit v1.2.1 From 81fb6ddaf3ba4ecb5e0129401239af75db45d84d Mon Sep 17 00:00:00 2001 From: Conlain Kelly Date: Wed, 18 Jul 2018 11:24:11 -0400 Subject: style fix --- src/components/application_manager/test/application_helper_test.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'src/components/application_manager/test/application_helper_test.cc') diff --git a/src/components/application_manager/test/application_helper_test.cc b/src/components/application_manager/test/application_helper_test.cc index e84dc5f7be..3203839fc2 100644 --- a/src/components/application_manager/test/application_helper_test.cc +++ b/src/components/application_manager/test/application_helper_test.cc @@ -51,7 +51,6 @@ #include "utils/custom_string.h" #include "utils/macro.h" - #include "test/resumption/mock_last_state.h" #include "media_manager/mock_media_manager.h" -- cgit v1.2.1