[Release] wrt-installer_0.1.53
[framework/web/wrt-installer.git] / tests / general / ParsingTizenAppcontrolTests.cpp
@@ -18,7 +18,7 @@
  * @author  Karol Pawlowski (k.pawlowski@samsung.com)
  * @author  Andrzej Surdej (a.surdej@samsung.com)
  * @version 1.0
- * @brief   Parsing Tizen Appservice test's bodies
+ * @brief   Parsing Tizen app-control test's bodies
  */
 
 #include <string>
@@ -32,57 +32,60 @@ using namespace InstallerWrapper;
 
 ////////////////////////////////////////////////////////////////////////////////
 
-RUNNER_TEST_GROUP_INIT(ParsingTizenAppservice)
+RUNNER_TEST_GROUP_INIT(ParsingTizenAppcontrol)
 
 /*
-Name: correct_csp_policy
-Description: Tests if widget policy is correctly parsed from config file
-             and stored into database
-Expected: widget should be installed and policy should mach
+Name: tizen_app-contro
+Description: Tests if widget app-control tag is correctly parsed
+Expected: widget should be installed
 */
-RUNNER_TEST(tizen_appservice_disposition)
+RUNNER_TEST(tizen_app_control)
 {
     std::string tizenId;
-    RUNNER_ASSERT(install(miscWidgetsStuff + "widgets/appservice_dispos.wgt",
+    RUNNER_ASSERT(install(miscWidgetsStuff + "widgets/app-control.wgt",
             tizenId) == InstallerWrapper::Success);
 
     WrtDB::WidgetDAOReadOnly dao(DPL::FromASCIIString(tizenId));
-    WrtDB::WidgetAppControlList appsvcList;
-    dao.getAppControlList(appsvcList);
+    WrtDB::WidgetAppControlList appcontrolList;
+    dao.getAppControlList(appcontrolList);
     uninstall(tizenId);
 
-    LogDebug("Actual size" << appsvcList.size());
-    RUNNER_ASSERT_MSG(appsvcList.size() == 4, "Incorrect list size");
+    LogDebug("Actual size" << appcontrolList.size());
+    RUNNER_ASSERT_MSG(appcontrolList.size() == 4, "Incorrect list size");
     WrtDB::WidgetAppControl s;
     s.src = DPL::FromUTF8String("edit1.html");
-    s.operation = DPL::FromUTF8String("http://tizen.org/appsvc/operation/edit");
+    s.operation = DPL::FromUTF8String("http://tizen.org/appcontrol/operation/edit");
     s.mime = DPL::FromUTF8String("image/jpg");      /* mime type */
     s.disposition = WrtDB::WidgetAppControl::Disposition::WINDOW;
+
     RUNNER_ASSERT_MSG(
-        std::find(appsvcList.begin(), appsvcList.end(), s) != appsvcList.end(),
+        std::find(appcontrolList.begin(), appcontrolList.end(), s) != appcontrolList.end(),
         "Unable to find service #");
 
     s.src = DPL::FromUTF8String("edit2.html");
-    s.operation = DPL::FromUTF8String("http://tizen.org/appsvc/operation/view");
+    s.operation = DPL::FromUTF8String("http://tizen.org/appcontrol/operation/view");
     s.mime = DPL::FromUTF8String("audio/ogg");      /* mime type */
     s.disposition = WrtDB::WidgetAppControl::Disposition::WINDOW;
+
     RUNNER_ASSERT_MSG(
-        std::find(appsvcList.begin(), appsvcList.end(), s) != appsvcList.end(),
+        std::find(appcontrolList.begin(), appcontrolList.end(), s) != appcontrolList.end(),
         "Unable to find service ##");
 
     s.src = DPL::FromUTF8String("edit3.html");
-    s.operation = DPL::FromUTF8String("http://tizen.org/appsvc/operation/call");
+    s.operation = DPL::FromUTF8String("http://tizen.org/appcontrol/operation/call");
     s.mime = DPL::FromUTF8String("image/png");      /* mime type */
-    s.disposition = WrtDB::WidgetAppControl::Disposition::INLINE;
+    s.disposition = WrtDB::WidgetAppControl::Disposition::WINDOW;
+
     RUNNER_ASSERT_MSG(
-        std::find(appsvcList.begin(), appsvcList.end(), s) != appsvcList.end(),
+        std::find(appcontrolList.begin(), appcontrolList.end(), s) != appcontrolList.end(),
         "Unable to find service ###");
 
     s.src = DPL::FromUTF8String("edit4.html");
-    s.operation = DPL::FromUTF8String("http://tizen.org/appsvc/operation/send");
+    s.operation = DPL::FromUTF8String("http://tizen.org/appcontrol/operation/send");
     s.mime = DPL::FromUTF8String("text/css");      /* mime type */
     s.disposition = WrtDB::WidgetAppControl::Disposition::WINDOW;
+
     RUNNER_ASSERT_MSG(
-        std::find(appsvcList.begin(), appsvcList.end(), s) != appsvcList.end(),
+        std::find(appcontrolList.begin(), appcontrolList.end(), s) != appcontrolList.end(),
         "Unable to find service ####");
 }