[dali_2.3.20] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-Alignment.cpp
index 879dbb3..d00fa11 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
-#include <iostream>
 #include <stdlib.h>
-
+#include <iostream>
 
 // Need to override adaptor classes for toolkit test harness, so include
 // test harness headers before dali headers.
 #include <dali-toolkit-test-suite-utils.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/alignment/alignment.h>
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/touch-event-integ.h>
-#include <dali-toolkit/dali-toolkit.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -39,9 +39,14 @@ void utc_dali_toolkit_alignment_cleanup(void)
   test_return_value = TET_PASS;
 }
 
-
 namespace
 {
+/// Compare an int (Or'd Alignment::Type) with an Alignment::Type value
+void DALI_TEST_EQUALS(int value1, Alignment::Type value2, const char* location)
+{
+  ::DALI_TEST_EQUALS<Alignment::Type>(static_cast<Alignment::Type>(value1), value2, location);
+}
+
 static bool gObjectCreatedCallBackCalled;
 
 static void TestCallback(BaseHandle handle)
@@ -50,7 +55,6 @@ static void TestCallback(BaseHandle handle)
 }
 } // namespace
 
-
 int UtcDaliAlignmentConstructorNegative(void)
 {
   ToolkitTestApplication application;
@@ -63,12 +67,9 @@ int UtcDaliAlignmentConstructorNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch(DaliException& e)
   {
-    if (exception.mCondition == "alignment")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "alignment", TEST_LOCATION);
   }
   END_TEST;
 }
@@ -85,15 +86,15 @@ int UtcDaliAlignmentConstructorPositive(void)
     alignment.SetPadding(padding);
     tet_result(TET_PASS);
   }
-  catch (DaliException& exception)
+  catch(DaliException& exception)
   {
     tet_result(TET_FAIL);
   }
 
   Actor actor = alignment;
-  alignment = Alignment::DownCast( actor );
+  alignment   = Alignment::DownCast(actor);
 
-  DALI_TEST_CHECK( alignment );
+  DALI_TEST_CHECK(alignment);
   END_TEST;
 }
 
@@ -101,16 +102,16 @@ int UtcDaliAlignmentConstructorRegister(void)
 {
   ToolkitTestApplication application;
 
-  //Te ensure the object is registered after creation
-  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
-  DALI_TEST_CHECK( registry );
+  //To ensure the object is registered after creation
+  ObjectRegistry registry = application.GetCore().GetObjectRegistry();
+  DALI_TEST_CHECK(registry);
 
   gObjectCreatedCallBackCalled = false;
   registry.ObjectCreatedSignal().Connect(&TestCallback);
   {
     Alignment alignment = Alignment::New();
   }
-  DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
+  DALI_TEST_CHECK(gObjectCreatedCallBackCalled);
   END_TEST;
 }
 
@@ -118,110 +119,110 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOffStage(void)
 {
   ToolkitTestApplication application;
 
-  // Default, HorizontalCenter, VerticalCenter - Ensure they do not change!
+  // Default, HORIZONTAL_CENTER, VERTICAL_CENTER - Ensure they do not change!
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::VerticalCenter));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalLeft, VerticalCenter
+  // HORIZONTAL_LEFT, VERTICAL_CENTER
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::HorizontalLeft);
+    Alignment::Type type(Alignment::HORIZONTAL_LEFT);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalRight, VerticalCenter
+  // HORIZONTAL_RIGHT, VERTICAL_CENTER
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::HorizontalRight);
+    Alignment::Type type(Alignment::HORIZONTAL_RIGHT);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalLeft, VerticalTop
+  // HORIZONTAL_LEFT, VERTICAL_TOP
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalTop));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_TOP));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalCenter, VerticalTop
+  // HORIZONTAL_CENTER, VERTICAL_TOP
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::VerticalTop);
+    Alignment::Type type(Alignment::VERTICAL_TOP);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalRight, VerticalTop
+  // HORIZONTAL_RIGHT, VERTICAL_TOP
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalTop));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_TOP));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalLeft, VerticalBottom
+  // HORIZONTAL_LEFT, VERTICAL_BOTTOM
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalBottom));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_BOTTOM));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalCenter, VerticalBottom
+  // HORIZONTAL_CENTER, VERTICAL_BOTTOM
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::VerticalBottom);
+    Alignment::Type type(Alignment::VERTICAL_BOTTOM);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
 
-  // HorizontalRight, VerticalBottom
+  // HORIZONTAL_RIGHT, VERTICAL_BOTTOM
   {
     Alignment alignment = Alignment::New();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalBottom));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_BOTTOM));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
   }
@@ -232,182 +233,182 @@ int UtcDaliAlignmentSetAlignmentTypePositiveOnStage(void)
 {
   ToolkitTestApplication application;
 
-  // Default, HorizontalCenter, VerticalCenter - Ensure they do not change!
+  // Default, HORIZONTAL_CENTER, VERTICAL_CENTER - Ensure they do not change!
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::VerticalCenter));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalLeft, VerticalCenter
+  // HORIZONTAL_LEFT, VERTICAL_CENTER
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::HorizontalLeft);
+    Alignment::Type type(Alignment::HORIZONTAL_LEFT);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalRight, VerticalCenter
+  // HORIZONTAL_RIGHT, VERTICAL_CENTER
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::HorizontalRight);
+    Alignment::Type type(Alignment::HORIZONTAL_RIGHT);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalLeft, VerticalTop
+  // HORIZONTAL_LEFT, VERTICAL_TOP
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalTop));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_TOP));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalCenter, VerticalTop
+  // HORIZONTAL_CENTER, VERTICAL_TOP
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::VerticalTop);
+    Alignment::Type type(Alignment::VERTICAL_TOP);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalRight, VerticalTop
+  // HORIZONTAL_RIGHT, VERTICAL_TOP
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalTop));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_TOP));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalLeft, VerticalBottom
+  // HORIZONTAL_LEFT, VERTICAL_BOTTOM
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::VerticalBottom));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_BOTTOM));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalCenter, VerticalBottom
+  // HORIZONTAL_CENTER, VERTICAL_BOTTOM
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::VerticalBottom);
+    Alignment::Type type(Alignment::VERTICAL_BOTTOM);
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalRight, VerticalBottom
+  // HORIZONTAL_RIGHT, VERTICAL_BOTTOM
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
     // Check default values
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
 
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalRight | Alignment::VerticalBottom));
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_BOTTOM));
     alignment.SetAlignmentType(type);
     DALI_TEST_CHECK(alignment.GetAlignmentType() & type);
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
@@ -418,80 +419,45 @@ int UtcDaliAlignmentSetAlignmentTypeNegative(void)
 {
   ToolkitTestApplication application;
 
-  // Setting HorizontalLeft, HorizontalCenter
+  // Setting HORIZONTAL_LEFT, HORIZONTAL_CENTER
   {
-    Alignment alignment = Alignment::New();
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalLeft | Alignment::HorizontalCenter));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!horizontalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    Alignment       alignment = Alignment::New();
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_LEFT | Alignment::HORIZONTAL_CENTER));
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK(Alignment::HORIZONTAL_CENTER & alignment.GetAlignmentType());
+    DALI_TEST_CHECK(!(Alignment::HORIZONTAL_LEFT & alignment.GetAlignmentType()));
   }
 
-  // Setting HorizontalCenter, HorizontalRight
+  // Setting HORIZONTAL_CENTER, HORIZONTAL_RIGHT
   {
-    Alignment alignment = Alignment::New();
-    Alignment::Type type(Alignment::Type(Alignment::HorizontalCenter | Alignment::HorizontalRight));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!horizontalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    Alignment       alignment = Alignment::New();
+    Alignment::Type type(Alignment::Type(Alignment::HORIZONTAL_CENTER | Alignment::HORIZONTAL_RIGHT));
+
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK(Alignment::HORIZONTAL_CENTER & alignment.GetAlignmentType());
+    DALI_TEST_CHECK(!(Alignment::HORIZONTAL_RIGHT & alignment.GetAlignmentType()));
   }
 
-  // Setting VerticalTop, VerticalCenter
+  // Setting VERTICAL_TOP, VERTICAL_CENTER
   {
-    Alignment alignment = Alignment::New();
-    Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalCenter));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!verticalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    Alignment       alignment = Alignment::New();
+    Alignment::Type type(Alignment::Type(Alignment::VERTICAL_TOP | Alignment::VERTICAL_CENTER));
+    alignment.SetAlignmentType(type);
+    // center will prevail in conflict
+    DALI_TEST_CHECK(Alignment::VERTICAL_CENTER & alignment.GetAlignmentType());
+    DALI_TEST_CHECK(!(Alignment::VERTICAL_TOP & alignment.GetAlignmentType()));
   }
 
-  // Setting VerticalCenter, VerticalBottom
+  // Setting VERTICAL_CENTER, VERTICAL_BOTTOM
   {
-    Alignment alignment = Alignment::New();
-    Alignment::Type type(Alignment::Type(Alignment::VerticalTop | Alignment::VerticalBottom));
-
-    try
-    {
-      alignment.SetAlignmentType(type);
-      tet_result(TET_FAIL);
-    }
-    catch (DaliException& exception)
-    {
-      if (exception.mCondition == "!veritcalSet")
-      {
-        tet_result(TET_PASS);
-      }
-    }
+    Alignment       alignment = Alignment::New();
+    Alignment::Type type(Alignment::Type(Alignment::VERTICAL_TOP | Alignment::VERTICAL_BOTTOM));
+    alignment.SetAlignmentType(type);
+    // top will prevail in conflict
+    DALI_TEST_CHECK(Alignment::VERTICAL_TOP & alignment.GetAlignmentType());
+    DALI_TEST_CHECK(!(Alignment::VERTICAL_BOTTOM & alignment.GetAlignmentType()));
   }
   END_TEST;
 }
@@ -500,119 +466,119 @@ int UtcDaliAlignmentGetAlignmentType(void)
 {
   ToolkitTestApplication application;
 
-  // Default, HorizonalCenter, VerticalCenter
+  // Default, HorizonalCenter, VERTICAL_CENTER
   {
     Alignment alignment = Alignment::New();
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalLeft, VerticalCenter
+  // HORIZONTAL_LEFT, VERTICAL_CENTER
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalLeft);
-    DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_LEFT);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalRight, VerticalCenter
+  // HORIZONTAL_RIGHT, VERTICAL_CENTER
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalRight);
-    DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalCenter, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_RIGHT);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_CENTER, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalLeft, VerticalTop
+  // HORIZONTAL_LEFT, VERTICAL_TOP
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalTop);
-    DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_LEFT, Alignment::VERTICAL_TOP);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_TOP, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalCenter, VerticalTop
+  // HORIZONTAL_CENTER, VERTICAL_TOP
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalTop);
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_CENTER, Alignment::VERTICAL_TOP);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_TOP, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalRight, VerticalTop
+  // HORIZONTAL_RIGHT, VERTICAL_TOP
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalTop);
-    DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalTop, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_RIGHT, Alignment::VERTICAL_TOP);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_TOP, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalLeft, VerticalBottom
+  // HORIZONTAL_LEFT, VERTICAL_BOTTOM
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalLeft, Alignment::VerticalBottom);
-    DALI_TEST_EQUALS(Alignment::HorizontalLeft | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_LEFT, Alignment::VERTICAL_BOTTOM);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_LEFT | Alignment::VERTICAL_BOTTOM, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalCenter, VerticalBottom
+  // HORIZONTAL_CENTER, VERTICAL_BOTTOM
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalCenter, Alignment::VerticalBottom);
-    DALI_TEST_EQUALS(Alignment::HorizontalCenter | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_CENTER, Alignment::VERTICAL_BOTTOM);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_CENTER | Alignment::VERTICAL_BOTTOM, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // HorizontalRight, VerticalBottom
+  // HORIZONTAL_RIGHT, VERTICAL_BOTTOM
   {
-    Alignment alignment = Alignment::New(Alignment::HorizontalRight, Alignment::VerticalBottom);
-    DALI_TEST_EQUALS(Alignment::HorizontalRight | Alignment::VerticalBottom, alignment.GetAlignmentType(), TEST_LOCATION);
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    Alignment alignment = Alignment::New(Alignment::HORIZONTAL_RIGHT, Alignment::VERTICAL_BOTTOM);
+    DALI_TEST_EQUALS(Alignment::HORIZONTAL_RIGHT | Alignment::VERTICAL_BOTTOM, alignment.GetAlignmentType(), TEST_LOCATION);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
@@ -623,167 +589,167 @@ int UtcDaliAlignmentSetScaling(void)
 {
   ToolkitTestApplication application;
 
-  // ScaleToFill
+  // SCALE_TO_FILL
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
-    DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
-    alignment.SetScaling(Alignment::ScaleToFill);
-    DALI_TEST_EQUALS(Alignment::ScaleToFill, alignment.GetScaling(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+    alignment.SetScaling(Alignment::SCALE_TO_FILL);
+    DALI_TEST_EQUALS(Alignment::SCALE_TO_FILL, alignment.GetScaling(), TEST_LOCATION);
     application.Render();
     application.SendNotification();
 
     // For complete line coverage
-    alignment.SetAlignmentType(Alignment::HorizontalLeft);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::HorizontalRight);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalTop);
+    alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalBottom);
+    alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
     application.Render();
     application.SendNotification();
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // ScaleToFitKeepAspect
+  // SCALE_TO_FIT_KEEP_ASPECT
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
-    DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
-    alignment.SetScaling(Alignment::ScaleToFitKeepAspect);
-    DALI_TEST_EQUALS(Alignment::ScaleToFitKeepAspect, alignment.GetScaling(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+    alignment.SetScaling(Alignment::SCALE_TO_FIT_KEEP_ASPECT);
+    DALI_TEST_EQUALS(Alignment::SCALE_TO_FIT_KEEP_ASPECT, alignment.GetScaling(), TEST_LOCATION);
     application.Render();
     application.SendNotification();
 
     // For complete line coverage
-    alignment.SetAlignmentType(Alignment::HorizontalLeft);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::HorizontalRight);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalTop);
+    alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalBottom);
+    alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
     application.Render();
     application.SendNotification();
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // ScaleToFillKeepAspect
+  // SCALE_TO_FILL_KEEP_ASPECT
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
-    DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
-    alignment.SetScaling(Alignment::ScaleToFillKeepAspect);
-    DALI_TEST_EQUALS(Alignment::ScaleToFillKeepAspect, alignment.GetScaling(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+    alignment.SetScaling(Alignment::SCALE_TO_FILL_KEEP_ASPECT);
+    DALI_TEST_EQUALS(Alignment::SCALE_TO_FILL_KEEP_ASPECT, alignment.GetScaling(), TEST_LOCATION);
     application.Render();
     application.SendNotification();
 
     // For complete line coverage
-    alignment.SetAlignmentType(Alignment::HorizontalLeft);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::HorizontalRight);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalTop);
+    alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalBottom);
+    alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
     application.Render();
     application.SendNotification();
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // ShrinkToFit
+  // SHRINK_TO_FIT
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
-    DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
-    alignment.SetScaling(Alignment::ShrinkToFit);
-    DALI_TEST_EQUALS(Alignment::ShrinkToFit, alignment.GetScaling(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+    alignment.SetScaling(Alignment::SHRINK_TO_FIT);
+    DALI_TEST_EQUALS(Alignment::SHRINK_TO_FIT, alignment.GetScaling(), TEST_LOCATION);
     application.Render();
     application.SendNotification();
 
     // For complete line coverage
-    alignment.SetAlignmentType(Alignment::HorizontalLeft);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::HorizontalRight);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalTop);
+    alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalBottom);
+    alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
     application.Render();
     application.SendNotification();
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
 
-  // ShrinkToFitKeepAspect
+  // SHRINK_TO_FIT_KEEP_ASPECT
   {
     Alignment alignment = Alignment::New();
-    alignment.Add(RenderableActor::New());
-    Stage::GetCurrent().Add(alignment);
+    alignment.Add(Actor::New());
+    application.GetScene().Add(alignment);
     application.Render();
     application.SendNotification();
 
-    DALI_TEST_EQUALS(Alignment::ScaleNone, alignment.GetScaling(), TEST_LOCATION);
-    alignment.SetScaling(Alignment::ShrinkToFitKeepAspect);
-    DALI_TEST_EQUALS(Alignment::ShrinkToFitKeepAspect, alignment.GetScaling(), TEST_LOCATION);
+    DALI_TEST_EQUALS(Alignment::SCALE_NONE, alignment.GetScaling(), TEST_LOCATION);
+    alignment.SetScaling(Alignment::SHRINK_TO_FIT_KEEP_ASPECT);
+    DALI_TEST_EQUALS(Alignment::SHRINK_TO_FIT_KEEP_ASPECT, alignment.GetScaling(), TEST_LOCATION);
     application.Render();
     application.SendNotification();
 
     // For complete line coverage
-    alignment.SetAlignmentType(Alignment::HorizontalLeft);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_LEFT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::HorizontalRight);
+    alignment.SetAlignmentType(Alignment::HORIZONTAL_RIGHT);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalTop);
+    alignment.SetAlignmentType(Alignment::VERTICAL_TOP);
     application.Render();
     application.SendNotification();
-    alignment.SetAlignmentType(Alignment::VerticalBottom);
+    alignment.SetAlignmentType(Alignment::VERTICAL_BOTTOM);
     application.Render();
     application.SendNotification();
 
-    Stage::GetCurrent().Remove(alignment);
+    application.GetScene().Remove(alignment);
     application.Render();
     application.SendNotification();
   }
@@ -794,49 +760,49 @@ int UtcDaliAlignmentGetScaling(void)
 {
   ToolkitTestApplication application;
 
-  // ScaleToFill
+  // SCALE_TO_FILL
   {
     Alignment alignment = Alignment::New();
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
 
-    alignment.SetScaling(Alignment::ScaleToFill);
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleToFill);
+    alignment.SetScaling(Alignment::SCALE_TO_FILL);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_TO_FILL);
   }
 
-  // ScaleToFitKeepAspect
+  // SCALE_TO_FIT_KEEP_ASPECT
   {
     Alignment alignment = Alignment::New();
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
 
-    alignment.SetScaling(Alignment::ScaleToFitKeepAspect);
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleToFitKeepAspect);
+    alignment.SetScaling(Alignment::SCALE_TO_FIT_KEEP_ASPECT);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_TO_FIT_KEEP_ASPECT);
   }
 
-  // ScaleToFillKeepAspect
+  // SCALE_TO_FILL_KEEP_ASPECT
   {
     Alignment alignment = Alignment::New();
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
 
-    alignment.SetScaling(Alignment::ScaleToFillKeepAspect);
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleToFillKeepAspect);
+    alignment.SetScaling(Alignment::SCALE_TO_FILL_KEEP_ASPECT);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_TO_FILL_KEEP_ASPECT);
   }
 
-  // ShrinkToFit
+  // SHRINK_TO_FIT
   {
     Alignment alignment = Alignment::New();
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
 
-    alignment.SetScaling(Alignment::ShrinkToFit);
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ShrinkToFit);
+    alignment.SetScaling(Alignment::SHRINK_TO_FIT);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SHRINK_TO_FIT);
   }
 
-  // ShrinkToFitKeepAspect
+  // SHRINK_TO_FIT_KEEP_ASPECT
   {
     Alignment alignment = Alignment::New();
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ScaleNone);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SCALE_NONE);
 
-    alignment.SetScaling(Alignment::ShrinkToFitKeepAspect);
-    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::ShrinkToFitKeepAspect);
+    alignment.SetScaling(Alignment::SHRINK_TO_FIT_KEEP_ASPECT);
+    DALI_TEST_CHECK(alignment.GetScaling() == Alignment::SHRINK_TO_FIT_KEEP_ASPECT);
   }
 
   END_TEST;
@@ -849,16 +815,16 @@ int UtcDaliAlignmentSetPaddingPositive(void)
   Alignment alignment = Alignment::New();
 
   Alignment::Padding padding(1.0f, 1.5f, 2.f, 0.5f);
-  DALI_TEST_CHECK( fabs( padding.left - alignment.GetPadding().left ) > GetRangedEpsilon( padding.left, alignment.GetPadding().left ) );
-  DALI_TEST_CHECK( fabs( padding.right - alignment.GetPadding().right ) > GetRangedEpsilon( padding.right, alignment.GetPadding().right ) );
-  DALI_TEST_CHECK( fabs( padding.top - alignment.GetPadding().top ) > GetRangedEpsilon( padding.top, alignment.GetPadding().top ) );
-  DALI_TEST_CHECK( fabs( padding.bottom - alignment.GetPadding().bottom ) > GetRangedEpsilon( padding.bottom, alignment.GetPadding().bottom ) );
+  DALI_TEST_CHECK(fabs(padding.left - alignment.GetPadding().left) > GetRangedEpsilon(padding.left, alignment.GetPadding().left));
+  DALI_TEST_CHECK(fabs(padding.right - alignment.GetPadding().right) > GetRangedEpsilon(padding.right, alignment.GetPadding().right));
+  DALI_TEST_CHECK(fabs(padding.top - alignment.GetPadding().top) > GetRangedEpsilon(padding.top, alignment.GetPadding().top));
+  DALI_TEST_CHECK(fabs(padding.bottom - alignment.GetPadding().bottom) > GetRangedEpsilon(padding.bottom, alignment.GetPadding().bottom));
 
   alignment.SetPadding(padding);
-  DALI_TEST_CHECK( fabs( padding.left - alignment.GetPadding().left ) < GetRangedEpsilon( padding.left, alignment.GetPadding().left ) );
-  DALI_TEST_CHECK( fabs( padding.right - alignment.GetPadding().right ) < GetRangedEpsilon( padding.right, alignment.GetPadding().right ) );
-  DALI_TEST_CHECK( fabs( padding.top - alignment.GetPadding().top ) < GetRangedEpsilon( padding.top, alignment.GetPadding().top ) );
-  DALI_TEST_CHECK( fabs( padding.bottom - alignment.GetPadding().bottom ) < GetRangedEpsilon( padding.bottom, alignment.GetPadding().bottom ) );
+  DALI_TEST_CHECK(fabs(padding.left - alignment.GetPadding().left) < GetRangedEpsilon(padding.left, alignment.GetPadding().left));
+  DALI_TEST_CHECK(fabs(padding.right - alignment.GetPadding().right) < GetRangedEpsilon(padding.right, alignment.GetPadding().right));
+  DALI_TEST_CHECK(fabs(padding.top - alignment.GetPadding().top) < GetRangedEpsilon(padding.top, alignment.GetPadding().top));
+  DALI_TEST_CHECK(fabs(padding.bottom - alignment.GetPadding().bottom) < GetRangedEpsilon(padding.bottom, alignment.GetPadding().bottom));
   END_TEST;
 }
 
@@ -874,12 +840,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch(DaliException& e)
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "(padding.left >= 0.f) && (padding.top >= 0.f) && (padding.right >= 0.f) && (padding.bottom >= 0.f)", TEST_LOCATION);
   }
 
   try
@@ -888,12 +851,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch(DaliException& e)
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "(padding.left >= 0.f) && (padding.top >= 0.f) && (padding.right >= 0.f) && (padding.bottom >= 0.f)", TEST_LOCATION);
   }
 
   try
@@ -902,12 +862,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch(DaliException& e)
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "(padding.left >= 0.f) && (padding.top >= 0.f) && (padding.right >= 0.f) && (padding.bottom >= 0.f)", TEST_LOCATION);
   }
 
   try
@@ -916,12 +873,9 @@ int UtcDaliAlignmentSetPaddingNegative(void)
     alignment.SetPadding(padding);
     tet_result(TET_FAIL);
   }
-  catch (DaliException& exception)
+  catch(DaliException& e)
   {
-    if (exception.mCondition == "( padding.left >= 0.f ) && ( padding.top >= 0.f ) && ( padding.right >= 0.f ) && ( padding.bottom >= 0.f )")
-    {
-      tet_result(TET_PASS);
-    }
+    DALI_TEST_ASSERT(e, "(padding.left >= 0.f) && (padding.top >= 0.f) && (padding.right >= 0.f) && (padding.bottom >= 0.f)", TEST_LOCATION);
   }
   END_TEST;
 }
@@ -931,17 +885,17 @@ int UtcDaliAlignmentGetPadding(void)
   ToolkitTestApplication application;
 
   Alignment alignment = Alignment::New();
-  DALI_TEST_CHECK( fabs( alignment.GetPadding().left ) < GetRangedEpsilon( 0.f, alignment.GetPadding().left ) );
-  DALI_TEST_CHECK( fabs( alignment.GetPadding().right ) < GetRangedEpsilon( 0.f, alignment.GetPadding().right ) );
-  DALI_TEST_CHECK( fabs( alignment.GetPadding().top ) < GetRangedEpsilon( 0.f, alignment.GetPadding().top ) );
-  DALI_TEST_CHECK( fabs( alignment.GetPadding().bottom ) < GetRangedEpsilon( 0.f, alignment.GetPadding().bottom ) );
+  DALI_TEST_CHECK(fabs(alignment.GetPadding().left) < GetRangedEpsilon(0.f, alignment.GetPadding().left));
+  DALI_TEST_CHECK(fabs(alignment.GetPadding().right) < GetRangedEpsilon(0.f, alignment.GetPadding().right));
+  DALI_TEST_CHECK(fabs(alignment.GetPadding().top) < GetRangedEpsilon(0.f, alignment.GetPadding().top));
+  DALI_TEST_CHECK(fabs(alignment.GetPadding().bottom) < GetRangedEpsilon(0.f, alignment.GetPadding().bottom));
 
   Alignment::Padding padding(1.0f, 1.5f, 2.f, 0.f);
   alignment.SetPadding(padding);
-  DALI_TEST_CHECK( fabs( padding.left - alignment.GetPadding().left ) < GetRangedEpsilon( padding.left, alignment.GetPadding().left ) );
-  DALI_TEST_CHECK( fabs( padding.right - alignment.GetPadding().right ) < GetRangedEpsilon( padding.right, alignment.GetPadding().right ) );
-  DALI_TEST_CHECK( fabs( padding.top - alignment.GetPadding().top ) < GetRangedEpsilon( padding.top, alignment.GetPadding().top ) );
-  DALI_TEST_CHECK( fabs( padding.bottom - alignment.GetPadding().bottom ) < GetRangedEpsilon( padding.bottom, alignment.GetPadding().bottom ) );
+  DALI_TEST_CHECK(fabs(padding.left - alignment.GetPadding().left) < GetRangedEpsilon(padding.left, alignment.GetPadding().left));
+  DALI_TEST_CHECK(fabs(padding.right - alignment.GetPadding().right) < GetRangedEpsilon(padding.right, alignment.GetPadding().right));
+  DALI_TEST_CHECK(fabs(padding.top - alignment.GetPadding().top) < GetRangedEpsilon(padding.top, alignment.GetPadding().top));
+  DALI_TEST_CHECK(fabs(padding.bottom - alignment.GetPadding().bottom) < GetRangedEpsilon(padding.bottom, alignment.GetPadding().bottom));
   END_TEST;
 }
 
@@ -950,12 +904,12 @@ int UtcDaliAlignmentChildAddAndRemove(void)
   ToolkitTestApplication application;
 
   Alignment alignment = Alignment::New();
-  Stage::GetCurrent().Add(alignment);
+  application.GetScene().Add(alignment);
 
   application.Render();
   application.SendNotification();
 
-  Actor actor = RenderableActor::New();
+  Actor actor = Actor::New();
   alignment.Add(actor);
 
   DALI_TEST_EQUALS(alignment.GetChildCount(), 1u, TEST_LOCATION);
@@ -970,36 +924,36 @@ int UtcDaliAlignmentChildAddAndRemove(void)
   application.Render();
   application.SendNotification();
 
-  Stage::GetCurrent().Remove(alignment);
+  application.GetScene().Remove(alignment);
   END_TEST;
 }
 
-int UtcDaliAlignmentOnSizeSet(void)
+int UtcDaliAlignmentSizeSetP(void)
 {
   ToolkitTestApplication application;
 
   Alignment alignment = Alignment::New();
-  Stage::GetCurrent().Add(alignment);
+  application.GetScene().Add(alignment);
 
   application.Render();
   application.SendNotification();
 
-  Vector3 size(100.0f, 200.0f, 0.0f);
-  alignment.SetSize(size);
+  Vector2 size(100.0f, 200.0f);
+  alignment.SetProperty(Actor::Property::SIZE, size);
 
   application.Render();
   application.SendNotification();
   application.Render();
   application.SendNotification();
 
-  DALI_TEST_EQUALS(size, alignment.GetImplementation().GetControlSize(), TEST_LOCATION);
+  DALI_TEST_EQUALS(size, alignment.GetTargetSize().GetVectorXY(), TEST_LOCATION);
 
-  Stage::GetCurrent().Remove(alignment);
+  application.GetScene().Remove(alignment);
   END_TEST;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static bool TouchEventCallback(Actor actor, const TouchEvent& event)
+static bool TouchCallback(Actor actor, const TouchEvent& event)
 {
   return false;
 }
@@ -1011,11 +965,11 @@ int UtcDaliAlignmentOnTouchEvent(void)
   ToolkitTestApplication application;
 
   Alignment alignment = Alignment::New();
-  alignment.SetSize(100.0f, 100.0f);
-  alignment.SetAnchorPoint(AnchorPoint::TOP_LEFT);
-  Stage::GetCurrent().Add(alignment);
+  alignment.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 100.0f));
+  alignment.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  application.GetScene().Add(alignment);
 
-  alignment.TouchedSignal().Connect(&TouchEventCallback);
+  alignment.TouchedSignal().Connect(&TouchCallback);
 
   application.Render();
   application.SendNotification();
@@ -1023,7 +977,10 @@ int UtcDaliAlignmentOnTouchEvent(void)
   application.SendNotification();
 
   Integration::TouchEvent touchEvent(1);
-  TouchPoint point(1, TouchPoint::Down, 20.0f, 20.0f);
+  Integration::Point      point;
+  point.SetDeviceId(1);
+  point.SetState(PointState::DOWN);
+  point.SetScreenPosition(Vector2(20.0f, 20.0f));
   touchEvent.AddPoint(point);
   application.ProcessEvent(touchEvent);
 
@@ -1036,7 +993,7 @@ int UtcDaliAlignmentOnKeyEvent(void)
   ToolkitTestApplication application;
 
   Alignment alignment = Alignment::New();
-  Stage::GetCurrent().Add(alignment);
+  application.GetScene().Add(alignment);
 
   alignment.SetKeyInputFocus();
 
@@ -1057,10 +1014,10 @@ int UtcDaliAlignmentOnSizeAnimation(void)
   ToolkitTestApplication application;
 
   Alignment alignment = Alignment::New();
-  Stage::GetCurrent().Add(alignment);
+  application.GetScene().Add(alignment);
 
   Animation animation = Animation::New(100.0f);
-  animation.Resize(alignment, Vector3(100.0f, 150.0f, 200.0f));
+  animation.AnimateTo(Property(alignment, Actor::Property::SIZE), Vector3(100.0f, 150.0f, 200.0f));
   animation.Play();
 
   application.Render();
@@ -1083,20 +1040,20 @@ int UtcDaliAlignmentCopyAndAssignment(void)
   alignment.SetPadding(padding);
 
   Alignment alignmentCopy(alignment);
-  DALI_TEST_CHECK( fabs( padding.left - alignmentCopy.GetPadding().left ) < GetRangedEpsilon( padding.left, alignmentCopy.GetPadding().left ) );
-  DALI_TEST_CHECK( fabs( padding.right - alignmentCopy.GetPadding().right ) < GetRangedEpsilon( padding.right, alignmentCopy.GetPadding().right ) );
-  DALI_TEST_CHECK( fabs( padding.top - alignmentCopy.GetPadding().top ) < GetRangedEpsilon( padding.top, alignmentCopy.GetPadding().top ) );
-  DALI_TEST_CHECK( fabs( padding.bottom - alignmentCopy.GetPadding().bottom ) < GetRangedEpsilon( padding.bottom, alignmentCopy.GetPadding().bottom ) );
+  DALI_TEST_CHECK(fabs(padding.left - alignmentCopy.GetPadding().left) < GetRangedEpsilon(padding.left, alignmentCopy.GetPadding().left));
+  DALI_TEST_CHECK(fabs(padding.right - alignmentCopy.GetPadding().right) < GetRangedEpsilon(padding.right, alignmentCopy.GetPadding().right));
+  DALI_TEST_CHECK(fabs(padding.top - alignmentCopy.GetPadding().top) < GetRangedEpsilon(padding.top, alignmentCopy.GetPadding().top));
+  DALI_TEST_CHECK(fabs(padding.bottom - alignmentCopy.GetPadding().bottom) < GetRangedEpsilon(padding.bottom, alignmentCopy.GetPadding().bottom));
 
   Alignment alignmentEmptyCopy(emptyAlignment);
   DALI_TEST_CHECK(emptyAlignment == alignmentEmptyCopy);
 
   Alignment alignmentEquals;
   alignmentEquals = alignment;
-  DALI_TEST_CHECK( fabs( padding.left - alignmentEquals.GetPadding().left ) < GetRangedEpsilon( padding.left, alignmentEquals.GetPadding().left ) );
-  DALI_TEST_CHECK( fabs( padding.right - alignmentEquals.GetPadding().right ) < GetRangedEpsilon( padding.right, alignmentEquals.GetPadding().right ) );
-  DALI_TEST_CHECK( fabs( padding.top - alignmentEquals.GetPadding().top ) < GetRangedEpsilon( padding.top, alignmentEquals.GetPadding().top ) );
-  DALI_TEST_CHECK( fabs( padding.bottom - alignmentEquals.GetPadding().bottom ) < GetRangedEpsilon( padding.bottom, alignmentEquals.GetPadding().bottom ) );
+  DALI_TEST_CHECK(fabs(padding.left - alignmentEquals.GetPadding().left) < GetRangedEpsilon(padding.left, alignmentEquals.GetPadding().left));
+  DALI_TEST_CHECK(fabs(padding.right - alignmentEquals.GetPadding().right) < GetRangedEpsilon(padding.right, alignmentEquals.GetPadding().right));
+  DALI_TEST_CHECK(fabs(padding.top - alignmentEquals.GetPadding().top) < GetRangedEpsilon(padding.top, alignmentEquals.GetPadding().top));
+  DALI_TEST_CHECK(fabs(padding.bottom - alignmentEquals.GetPadding().bottom) < GetRangedEpsilon(padding.bottom, alignmentEquals.GetPadding().bottom));
 
   Alignment alignmentEmptyEquals;
   alignmentEmptyEquals = emptyAlignment;