summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/test/include
diff options
context:
space:
mode:
authorokozlovlux <okozlov@luxoft.com>2017-02-20 19:16:07 +0200
committerokozlovlux <okozlov@luxoft.com>2017-05-17 19:27:11 +0300
commit6a3c65f64fb7e9e5a770476b3f664d57606af33a (patch)
treebc618e0ff31525d9157b1df098a5149efe557720 /src/components/policy/policy_external/test/include
parent8aadc5d6d51b49c381fb89fd4b1fbfebec732cc3 (diff)
downloadsdl_core-6a3c65f64fb7e9e5a770476b3f664d57606af33a.tar.gz
Add functionality for External UCS
- added functionality for External UCS: ON by the User - added UTs for policices External UCS: ON by the User - added perstistence for external user consent status received from system Fix issuies for HTTP and PROPRIETARY mode in mock policy handler - fixed issues in mock policy handler - fix coding style
Diffstat (limited to 'src/components/policy/policy_external/test/include')
-rw-r--r--src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h b/src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h
index 09a4a0e391..e753751308 100644
--- a/src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h
+++ b/src/components/policy/policy_external/test/include/policy/policy_manager_impl_test_base.h
@@ -66,10 +66,12 @@ const std::string kHmiLevelBackground = "BACKGROUND";
const std::string kHmiLevelNone = "None";
const std::string kPtuJson = "json/PTU.json";
+const std::string kPtu2Json = "json/PTU2.json";
const std::string kPtu3Json = "json/PTU3.json";
const std::string kValidSdlPtUpdateJson = "json/valid_sdl_pt_update.json";
const std::string kPtuRequestTypeJson = "json/ptu_requestType.json";
const std::string kPtu2RequestTypeJson = "json/ptu2_requestType.json";
+const std::string kDummyUpdateFileName = "DummyName";
} // namespace
struct StringsForUpdate {
@@ -84,6 +86,7 @@ void CheckIsParamInList(const ::policy::RPCParams& list,
const std::string& parameter);
Json::Value createPTforLoad();
void InsertRpcParametersInList(::policy::RPCParams& input_params);
+policy_table::AppHmiTypes HmiTypes(const policy_table::AppHMIType hmi_type);
template <typename T>
void SortAndCheckEquality(std::vector<T> first, std::vector<T> second) {
@@ -132,7 +135,7 @@ class PolicyManagerImplTest2 : public ::testing::Test {
const std::string device_id_2_;
const std::string application_id_;
const std::string app_storage_folder_;
- const std::string preloadet_pt_filename_;
+ const std::string preloaded_pt_filename_;
const bool in_memory_;
PolicyManagerImpl* policy_manager_;
@@ -188,6 +191,10 @@ class PolicyManagerImplTest2 : public ::testing::Test {
void CheckRpcPermissions(const std::string& rpc_name,
const PermitResult& expected_permission);
+ void CheckRpcPermissions(const std::string& app_id,
+ const std::string& rpc_name,
+ const policy::PermitResult& out_expected_permission);
+
// To avoid duplicate arrange of test
void AddSetDeviceData();
@@ -196,12 +203,6 @@ class PolicyManagerImplTest2 : public ::testing::Test {
void EmulatePTAppRevoked(const std::string& ptu_name);
- void TestSetDeviceUSBConnection(
- const policy_table::UserSetting usb_transport_status);
-
- void TestUpdateUSBConnectionStatus(
- const policy_table::UserSetting usb_transport_status);
-
utils::SharedPtr<policy_table::Table> PreconditionForBasicValidateSnapshot();
template <typename ParentType, typename Value>
@@ -233,7 +234,7 @@ class PolicyManagerImplTest_RequestTypes : public ::testing::Test {
const std::string kAppId;
const std::string kDefaultAppId;
const std::string app_storage_folder_;
- const std::string preloadet_pt_filename_;
+ const std::string preloaded_pt_filename_;
utils::SharedPtr<PolicyManagerImpl> policy_manager_impl_sptr_;
NiceMock<MockPolicyListener> listener_;
@@ -267,20 +268,20 @@ class PolicyManagerImplTest_RequestTypes : public ::testing::Test {
void TearDown() OVERRIDE;
};
-class PolicyManagerImplTest_CCS : public PolicyManagerImplTest2 {
+class PolicyManagerImplTest_ExternalConsent : public PolicyManagerImplTest2 {
public:
- PolicyManagerImplTest_CCS()
+ PolicyManagerImplTest_ExternalConsent()
: PolicyManagerImplTest2()
, group_name_1_("Group1")
, group_name_2_("Group2")
, group_name_3_("Group3") {}
protected:
- void PreconditionCCSPreparePTWithAppGroupsAndConsents();
+ void PreconditionExternalConsentPreparePTWithAppGroupsAndConsents();
- void PreconditionCCSPreparePTWithAppPolicy();
+ void PreconditionExternalConsentPreparePTWithAppPolicy();
- policy_table::Table PreparePTWithGroupsHavingCCS();
+ policy_table::Table PreparePTWithGroupsHavingExternalConsent();
std::string PreparePTUWithNewGroup(const uint32_t type,
const uint32_t id,