summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/test/policy_manager_impl_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/policy/policy_external/test/policy_manager_impl_test.cc')
-rw-r--r--src/components/policy/policy_external/test/policy_manager_impl_test.cc38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/components/policy/policy_external/test/policy_manager_impl_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_test.cc
index f4e922e647..6521db7c36 100644
--- a/src/components/policy/policy_external/test/policy_manager_impl_test.cc
+++ b/src/components/policy/policy_external/test/policy_manager_impl_test.cc
@@ -37,8 +37,6 @@
#include <utility>
#include "policy/policy_manager_impl_test_base.h"
-#include "utils/make_shared.h"
-#include "utils/shared_ptr.h"
using ::testing::_;
using ::testing::Return;
@@ -148,8 +146,8 @@ TEST_F(PolicyManagerImplTest, LoadPT_SetPT_PTIsLoaded) {
std::string json = table.toStyledString();
::policy::BinaryMessage msg(json.begin(), json.end());
- utils::SharedPtr<policy_table::Table> snapshot =
- new policy_table::Table(update.policy_table);
+ std::shared_ptr<policy_table::Table> snapshot =
+ std::make_shared<policy_table::Table>(update.policy_table);
// Assert
EXPECT_CALL(*cache_manager_, GenerateSnapshot()).WillOnce(Return(snapshot));
EXPECT_CALL(*cache_manager_, ApplyUpdate(_)).WillOnce(Return(true));
@@ -236,9 +234,9 @@ TEST_F(PolicyManagerImplTest2, TimeOutExchange) {
TEST_F(PolicyManagerImplTest,
RequestPTUpdate_SetPT_GeneratedSnapshotAndPTUpdate) {
Json::Value table = createPTforLoad();
- utils::SharedPtr<policy_table::Table> p_table =
- utils::MakeShared<policy_table::Table>(&table);
- ASSERT_TRUE(p_table);
+ std::shared_ptr<policy_table::Table> p_table =
+ std::make_shared<policy_table::Table>(&table);
+ ASSERT_TRUE(p_table.get());
p_table->SetPolicyTableType(rpc::policy_table_interface_base::PT_UPDATE);
EXPECT_TRUE(IsValid(*p_table));
@@ -249,9 +247,9 @@ TEST_F(PolicyManagerImplTest,
}
TEST_F(PolicyManagerImplTest, RequestPTUpdate_InvalidPT_PTUpdateFail) {
- utils::SharedPtr<policy_table::Table> p_table =
- utils::MakeShared<policy_table::Table>();
- ASSERT_TRUE(p_table);
+ std::shared_ptr<policy_table::Table> p_table =
+ std::make_shared<policy_table::Table>();
+ ASSERT_TRUE(p_table.get());
EXPECT_FALSE(IsValid(*p_table));
EXPECT_CALL(listener_, OnSnapshotCreated(_, _, _)).Times(0);
@@ -261,7 +259,7 @@ TEST_F(PolicyManagerImplTest, RequestPTUpdate_InvalidPT_PTUpdateFail) {
}
TEST_F(PolicyManagerImplTest, RequestPTUpdate_InvalidSnapshot_PTUpdateFail) {
- utils::SharedPtr<policy_table::Table> p_table;
+ std::shared_ptr<policy_table::Table> p_table;
EXPECT_FALSE(p_table);
EXPECT_CALL(listener_, OnSnapshotCreated(_, _, _)).Times(0);
@@ -355,7 +353,7 @@ TEST_F(
PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
// Checking groups consents before setting ExternalConsent status
@@ -420,7 +418,7 @@ TEST_F(
PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
// Act
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
// Checking ExternalConsent consents before setting new ExternalConsent status
@@ -484,7 +482,7 @@ TEST_F(
PreconditionExternalConsentPreparePTWithAppPolicy();
// Act
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
ExternalConsentStatus status;
@@ -552,7 +550,7 @@ TEST_F(
PreconditionExternalConsentPreparePTWithAppPolicy();
// Act
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
ExternalConsentStatus status;
@@ -634,7 +632,7 @@ TEST_F(
HmiTypes(policy_table::AHT_DEFAULT));
// Act
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
ExternalConsentStatus status;
@@ -724,7 +722,7 @@ TEST_F(
HmiTypes(policy_table::AHT_DEFAULT));
// Act
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
ExternalConsentStatus status;
@@ -818,7 +816,7 @@ TEST_F(PolicyManagerImplTest_ExternalConsent,
policy_manager_->AddApplication(app_id_1_,
HmiTypes(policy_table::AHT_DEFAULT));
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
// Check ExternalConsent consents for application
@@ -943,7 +941,7 @@ TEST_F(PolicyManagerImplTest_ExternalConsent,
policy_manager_->AddApplication(app_id_1_,
HmiTypes(policy_table::AHT_DEFAULT));
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
// Check ExternalConsent consents for application
@@ -1046,7 +1044,7 @@ TEST_F(
PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
// Act
- utils::SharedPtr<policy_table::Table> pt =
+ std::shared_ptr<policy_table::Table> pt =
policy_manager_->GetCache()->GetPT();
// Checking ExternalConsent consents before setting new ExternalConsent status