Revert public API changes. Handle methods.
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-TransitionData.cpp
index 71851de..c0f7982 100644 (file)
@@ -18,6 +18,7 @@
 #include <stdlib.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali.h>
+#include <dali/devel-api/object/handle-devel.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
@@ -246,13 +247,13 @@ int UtcDaliTransitionDataMap1P(void)
   visual.SetName( "visual1" );
 
   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
-  dummyImpl.RegisterVisual( visualIndex, actor, visual );
+  dummyImpl.RegisterVisual( visualIndex, visual );
 
   Animation anim = dummyImpl.CreateTransition( transition );
   DALI_TEST_CHECK( anim );
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index mixColorIndex = renderer.GetPropertyIndex( ColorVisual::Property::MIX_COLOR );
+  Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
   application.SendNotification();
   application.Render(0);
 
@@ -309,13 +310,13 @@ int UtcDaliTransitionDataMap2P(void)
   visual.SetName( "visual1" );
 
   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
-  dummyImpl.RegisterVisual( visualIndex, actor, visual );
+  dummyImpl.RegisterVisual( visualIndex, visual );
 
   Animation anim = dummyImpl.CreateTransition( transition );
   DALI_TEST_CHECK( anim );
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index mixColorIndex = renderer.GetPropertyIndex( ColorVisual::Property::MIX_COLOR );
+  Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
   application.SendNotification();
   application.Render(0);
 
@@ -372,7 +373,7 @@ int UtcDaliTransitionDataMap3P(void)
   visual.SetName( "visual1" );
 
   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
-  dummyImpl.RegisterVisual( visualIndex, actor, visual );
+  dummyImpl.RegisterVisual( visualIndex, visual );
 
   Animation anim = dummyImpl.CreateTransition( transition );
   DALI_TEST_CHECK( anim );
@@ -518,7 +519,7 @@ int UtcDaliTransitionDataMapN3(void)
   visual.SetName( "visual1" );
 
   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
-  dummyImpl.RegisterVisual( visualIndex, actor, visual );
+  dummyImpl.RegisterVisual( visualIndex, visual );
 
   Animation anim = dummyImpl.CreateTransition( transition );
   DALI_TEST_CHECK( !anim );
@@ -559,7 +560,7 @@ int UtcDaliTransitionDataMapN4(void)
   visual.SetName( "visual1" );
 
   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
-  dummyImpl.RegisterVisual( visualIndex, actor, visual );
+  dummyImpl.RegisterVisual( visualIndex, visual );
 
   Animation anim = dummyImpl.CreateTransition( transition );
   DALI_TEST_CHECK( !anim );
@@ -569,7 +570,7 @@ int UtcDaliTransitionDataMapN4(void)
   application.SendNotification();
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index mixColorIdx = renderer.GetPropertyIndex(ColorVisual::Property::MIX_COLOR);
+  Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
 
   tet_printf( "Test that the property has been set to target value\n");
   DALI_TEST_EQUALS(renderer.GetProperty<Vector4>(mixColorIdx), Color::RED, 0.001, TEST_LOCATION);
@@ -610,7 +611,7 @@ int UtcDaliTransitionDataMapN5(void)
   visual.SetName( "visual1" );
 
   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
-  dummyImpl.RegisterVisual( visualIndex, actor, visual );
+  dummyImpl.RegisterVisual( visualIndex, visual );
 
   Animation anim = dummyImpl.CreateTransition( transition );
   DALI_TEST_CHECK( !anim );
@@ -620,7 +621,7 @@ int UtcDaliTransitionDataMapN5(void)
   application.SendNotification();
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index mixColorIdx = renderer.GetPropertyIndex(ColorVisual::Property::MIX_COLOR);
+  Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
 
   tet_printf( "Test that the property has been set to target value\n");
   DALI_TEST_EQUALS(renderer.GetProperty<Vector4>(mixColorIdx), Color::RED, 0.001, TEST_LOCATION);
@@ -661,7 +662,7 @@ int UtcDaliTransitionDataMapN6(void)
   visual.SetName( "visual1" );
 
   Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
-  dummyImpl.RegisterVisual( visualIndex, actor, visual );
+  dummyImpl.RegisterVisual( visualIndex, visual );
 
   Animation anim = dummyImpl.CreateTransition( transition );
   DALI_TEST_CHECK( !anim );
@@ -671,7 +672,7 @@ int UtcDaliTransitionDataMapN6(void)
   application.SendNotification();
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index mixColorIdx = renderer.GetPropertyIndex(ColorVisual::Property::MIX_COLOR);
+  Property::Index mixColorIdx = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
 
   tet_printf( "Test that the property has been set to target value\n");
   DALI_TEST_EQUALS(renderer.GetProperty<Vector4>(mixColorIdx), Color::RED, 0.001, TEST_LOCATION);