Further Setter/Getter public API removal from Dali::Actor
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ControlImpl.cpp
index 31f3094..60fd218 100644 (file)
@@ -217,9 +217,9 @@ int UtcDaliControlImplOnGestureMethods(void)
   // Check gesture actually happens
   {
     DummyControl dummy = DummyControl::New(true);
-    dummy.SetSize( Vector2(100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::SIZE, Vector2(100.0f, 100.0f ) );
 
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     // Render and notify a couple of times
@@ -375,14 +375,14 @@ int UtcDaliControlImplSizeSetP(void)
 
     DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size not set, no onSizeSet called
     Vector2 size(100.0f, 200.0f);
-    dummy.SetSize( size );
+    dummy.SetProperty( Actor::Property::SIZE, size );
 
     DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, false, TEST_LOCATION ); // Size is going to get negotiated, no onSizeSet called
 
     application.SendNotification();
     application.Render();
 
-    DALI_TEST_EQUALS( size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION );
+    DALI_TEST_EQUALS( size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION );
     DALI_TEST_EQUALS( dummyImpl.sizeSetCalled, true, TEST_LOCATION );
 
     Stage::GetCurrent().Remove(dummy);
@@ -400,17 +400,17 @@ int UtcDaliControlImplSizeSet2P(void)
     Stage::GetCurrent().Add(dummy);
 
     Vector2 size(100.0f, 200.0f);
-    DALI_TEST_CHECK( size != dummy.GetCurrentSize().GetVectorXY() );
+    DALI_TEST_CHECK( size != dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY() );
 
     application.SendNotification();
     application.Render();
 
-    dummy.SetSize(size);
+    dummy.SetProperty( Actor::Property::SIZE, size);
 
     application.SendNotification();
     application.Render();
 
-    DALI_TEST_EQUALS(size, dummy.GetCurrentSize().GetVectorXY(), TEST_LOCATION);
+    DALI_TEST_EQUALS(size, dummy.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).GetVectorXY(), TEST_LOCATION);
 
     Stage::GetCurrent().Remove(dummy);
   }
@@ -473,8 +473,8 @@ int UtcDaliControlImplTouchEvent(void)
     DummyControl dummy = DummyControl::New( true );
     Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
-    dummy.SetSize( Vector2( 100.0f, 100.0f ) );
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     application.Render();
@@ -499,8 +499,8 @@ int UtcDaliControlImplTouchEvent(void)
   {
     DummyControl dummy = DummyControl::New();
 
-    dummy.SetSize( Vector2( 100.0f, 100.0f ) );
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     application.Render();
@@ -529,8 +529,8 @@ int UtcDaliControlImplHoverEvent(void)
     DummyControl dummy = DummyControl::New( true );
     Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
-    dummy.SetSize( Vector2( 100.0f, 100.0f ) );
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     application.Render();
@@ -555,8 +555,8 @@ int UtcDaliControlImplHoverEvent(void)
   {
     DummyControl dummy = DummyControl::New();
 
-    dummy.SetSize( Vector2( 100.0f, 100.0f ) );
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     application.Render();
@@ -726,8 +726,8 @@ int UtcDaliControlImplWheelEvent(void)
     DummyControl dummy = DummyControl::New( true );
     Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
-    dummy.SetSize( Vector2( 100.0f, 100.0f ) );
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     dummy.WheelEventSignal().Connect(&WheelEventCallback);
@@ -752,8 +752,8 @@ int UtcDaliControlImplWheelEvent(void)
   {
     DummyControl dummy = DummyControl::New();
 
-    dummy.SetSize( Vector2( 100.0f, 100.0f ) );
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     dummy.WheelEventSignal().Connect(&WheelEventCallback);
@@ -780,8 +780,8 @@ int UtcDaliControlImplSetStyleName(void)
   {
     DummyControl dummy = DummyControl::New( true );
 
-    dummy.SetSize( Vector2( 100.0f, 100.0f ) );
-    dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+    dummy.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+    dummy.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
     Stage::GetCurrent().Add(dummy);
 
     dummy.SetStyleName("TestStyle");