Further Setter/Getter public API removal from Dali::Actor
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Layer.cpp
index e10feff..f71b499 100644 (file)
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/object/handle-devel.h>
 
 #include <dali-test-suite-utils.h>
 
@@ -265,10 +264,10 @@ int UtcDaliLayerSetSortFunction(void)
   // create two transparent actors so there is something to sort
   Actor actor = CreateRenderableActor( img );
   Actor actor2 = CreateRenderableActor( img );
-  actor.SetSize(1,1);
-  actor.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
-  actor2.SetSize(1,1);
-  actor2.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) );
+  actor.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
+  actor2.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) );
+  actor2.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
 
   // add to stage
   Stage::GetCurrent().Add( actor );
@@ -470,19 +469,21 @@ int UtcDaliLayerDefaultProperties(void)
   Property::Value v = actor.GetProperty(Layer::Property::CLIPPING_BOX);
   DALI_TEST_CHECK(v.Get<Rect<int> >() == testBox);
 
-  v = DevelHandle::GetCurrentProperty( actor, Layer::Property::CLIPPING_BOX );
+  v = actor.GetCurrentProperty( Layer::Property::CLIPPING_BOX );
   DALI_TEST_CHECK(v.Get<Rect<int> >() == testBox);
 
   // set the same boundaries, but through a clipping box object
   actor.SetClippingBox( testBox );
-
   DALI_TEST_CHECK( actor.GetClippingBox() == testBox );
 
+  actor.SetProperty(Layer::Property::BEHAVIOR, Property::Value(Layer::LAYER_UI));
+  DALI_TEST_CHECK(Property::STRING == actor.GetPropertyType(Layer::Property::BEHAVIOR));
+
   Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
-  DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_2D", TEST_LOCATION );
+  DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_UI", TEST_LOCATION );
 
-  behavior = DevelHandle::GetCurrentProperty( actor, Layer::Property::BEHAVIOR );
-  DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_2D", TEST_LOCATION );
+  behavior = actor.GetCurrentProperty( Layer::Property::BEHAVIOR );
+  DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_UI", TEST_LOCATION );
 
   END_TEST;
 }
@@ -583,7 +584,7 @@ int UtcDaliLayerBehaviour(void)
   TestApplication application;
   Layer layer = Layer::New();
 
-  DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_2D, TEST_LOCATION );
+  DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_UI, TEST_LOCATION );
   layer.SetBehavior( Dali::Layer::LAYER_3D );
   DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_3D, TEST_LOCATION );
   END_TEST;
@@ -608,8 +609,8 @@ Actor CreateActor( bool withAlpha )
   }
 
   Actor actor = CreateRenderableActor( bufferImage );
-  actor.SetParentOrigin( ParentOrigin::CENTER );
-  actor.SetAnchorPoint( AnchorPoint::CENTER );
+  actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+  actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
 
   return actor;
 }