Unify privilege representation
[platform/core/test/security-tests.git] / src / security-manager-tests / test_cases_app_defined_privilege.cpp
index a72a7d6..2e8965c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2017 - 2020 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
 #include <tzplatform.h>
 #include <app_install_helper.h>
 #include <scoped_installer.h>
+#include <privilege_names.h>
 
 RUNNER_TEST_GROUP_INIT(SECURITY_MANAGER_APP_DEFINED_PRIVILEGE)
 
 using namespace SecurityManagerTest;
+using namespace PrivilegeNames;
 
 RUNNER_CHILD_TEST(app_defined_01_global_install_untrusted)
 {
@@ -544,7 +546,7 @@ RUNNER_CHILD_TEST(app_defined_09_add_get_client_license)
 RUNNER_CHILD_TEST(app_defined_10_check_system_privileges)
 {
     const std::string providerAppId = "app_def_09_provider";
-    const Privilege privilege("http://tizen.org/privilege/internet", Privilege::UNTRUSTED);
+    const Privilege privilege(PRIV_INTERNET, Privilege::UNTRUSTED);
 
     InstallRequest requestInst;
     requestInst.setAppId(providerAppId);
@@ -608,4 +610,4 @@ RUNNER_CHILD_TEST(app_defined_12_invalid_common_name)
 
     CynaraTestClient::Client cynara;
     cynara.check(clientLabel, session, ownerId, clientPrivilegeLicense, CYNARA_API_ACCESS_DENIED);
-}
\ No newline at end of file
+}