+int UtcDaliTransitionDataMapN5(void)
+{
+ TestApplication application;
+
+ tet_printf("Testing visual doesn't animate with duff bezier data \n");
+
+ Property::Map map;
+ map["target"] = "visual1";
+ map["property"] = "mixColor";
+ map["initialValue"] = Color::MAGENTA;
+ map["targetValue"] = Color::RED;
+ map["animator"] = Property::Map()
+ .Add("alphaFunction", Property::Array().Add(.1f).Add(1.0f).Add(0.5f))
+ .Add("timePeriod", Property::Map()
+ .Add("delay", 0.5f)
+ .Add("duration", 1.0f));
+
+ Dali::Toolkit::TransitionData transition = TransitionData::New( map );
+
+ DummyControl actor = DummyControl::New();
+ actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
+ actor.SetName("Actor1");
+ actor.SetColor(Color::CYAN);
+ Stage::GetCurrent().Add(actor);
+
+ DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+ Property::Map visualMap;
+ visualMap[Visual::Property::TYPE] = Visual::COLOR;
+ visualMap[ColorVisual::Property::MIX_COLOR] = Color::MAGENTA;
+ Visual::Base visual = VisualFactory::Get().CreateVisual( visualMap );
+ visual.SetName( "visual1" );
+
+ Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
+ dummyImpl.RegisterVisual( visualIndex, visual );
+
+ Animation anim = dummyImpl.CreateTransition( transition );
+ DALI_TEST_CHECK( !anim );
+
+ application.SendNotification();
+ application.Render(0);
+ application.SendNotification();
+
+ Renderer renderer = actor.GetRendererAt(0);
+ 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);
+
+ END_TEST;
+}
+
+int UtcDaliTransitionDataMapN6(void)
+{
+ TestApplication application;
+
+ tet_printf("Testing visual doesn't animate with duff bezier data \n");
+
+ Property::Map map;
+ map["target"] = "visual1";
+ map["property"] = "mixColor";
+ map["initialValue"] = Color::MAGENTA;
+ map["targetValue"] = Color::RED;
+ map["animator"] = Property::Map()
+ .Add("alphaFunction", Property::Array().Add("1").Add("Two").Add("3").Add("4"))
+ .Add("timePeriod", Property::Map()
+ .Add("delay", 0.5f)
+ .Add("duration", 1.0f));
+
+ Dali::Toolkit::TransitionData transition = TransitionData::New( map );
+
+ DummyControl actor = DummyControl::New();
+ actor.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
+ actor.SetName("Actor1");
+ actor.SetColor(Color::CYAN);
+ Stage::GetCurrent().Add(actor);
+
+ DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+ Property::Map visualMap;
+ visualMap[Visual::Property::TYPE] = Visual::COLOR;
+ visualMap[ColorVisual::Property::MIX_COLOR] = Color::MAGENTA;
+ Visual::Base visual = VisualFactory::Get().CreateVisual( visualMap );
+ visual.SetName( "visual1" );
+
+ Property::Index visualIndex = Control::CONTROL_PROPERTY_END_INDEX + 1;
+ dummyImpl.RegisterVisual( visualIndex, visual );
+
+ Animation anim = dummyImpl.CreateTransition( transition );
+ DALI_TEST_CHECK( !anim );
+
+ application.SendNotification();
+ application.Render(0);
+ application.SendNotification();
+
+ Renderer renderer = actor.GetRendererAt(0);
+ 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);
+
+ END_TEST;
+}
+
+