--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/AlphaFunction")]
+ public class PublicAlphaFunctionTest
+ {
+ private const string tag = "NUITEST";
+
+ private delegate float dummyAlphaFunctionDelegate(float progress);
+ private dummyAlphaFunctionDelegate alphaFunction;
+
+ private float AlphaFunction(float progress)
+ {
+ return 1.0f;
+ }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlphaFunction Constructor, Creates an alpha function object with the user-defined alpha function")]
+ [Property("SPEC", "Tizen.NUI.AlphaFunction.AlphaFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlphaFunctionConstructorWithUserDefinedFunction()
+ {
+ tlog.Debug(tag, $"AlphaFunctionConstructorWithUserDefinedFunction START");
+
+ alphaFunction = new dummyAlphaFunctionDelegate(AlphaFunction);
+ var testingTarget = new AlphaFunction(alphaFunction);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlphaFunctionConstructorWithUserDefinedFunction END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlphaFunction Constructor, Creates an alpha function object with the default built-in alpha function")]
+ [Property("SPEC", "Tizen.NUI.AlphaFunction.AlphaFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlphaFunctionConstructorWithDefaultFunction()
+ {
+ tlog.Debug(tag, $"AlphaFunctionConstructorWithDefaultFunction START");
+
+ var testingTarget = new AlphaFunction();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlphaFunctionConstructorWithDefaultFunction END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlphaFunction Constructor, Creates an alpha function object with the built-in alpha function passed as a parameter to the constructor")]
+ [Property("SPEC", "Tizen.NUI.AlphaFunction.AlphaFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlphaFunctionConstructorWithDefaultFunctionAsParameter()
+ {
+ tlog.Debug(tag, $"AlphaFunctionConstructorWithDefaultFunctionAsParameter START");
+
+ var testingTarget = new AlphaFunction(Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlphaFunctionConstructorWithDefaultFunctionAsParameter END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlphaFunction Constructor, Creates a bezier alpha function. The bezier will have the first point at (0,0) and the end point at (1,1)")]
+ [Property("SPEC", "Tizen.NUI.AlphaFunction.AlphaFunction C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlphaFunctionConstructorNewBezierFunction()
+ {
+ tlog.Debug(tag, $"AlphaFunctionConstructorNewBezierFunction START");
+
+ var testingTarget = new AlphaFunction(new Vector2(0, 0), new Vector2(1, 1));
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlphaFunctionConstructorNewBezierFunction END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlphaFunction.GetBezierControlPoints method")]
+ [Property("SPEC", "Tizen.NUI.AlphaFunction.GetBezierControlPoints M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlphaFunctionGetBezierControlPoints()
+ {
+ tlog.Debug(tag, $"AlphaFunctionGetBezierControlPoints START");
+
+ var testingTarget = new AlphaFunction(new Vector2(0, 0), new Vector2(1, 1));
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.GetBezierControlPoints(out Vector2 controlPoint0, out Vector2 controlPoint1);
+ Assert.IsTrue(controlPoint0.X == 0);
+ Assert.IsTrue(controlPoint0.Y == 0);
+ Assert.IsTrue(controlPoint1.X == 1);
+ Assert.IsTrue(controlPoint1.Y == 1);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlphaFunctionGetBezierControlPoints END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlphaFunction.GetBuiltinFunction method")]
+ [Property("SPEC", "Tizen.NUI.AlphaFunction.GetBuiltinFunction M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlphaFunctionGetBuiltinFunction()
+ {
+ tlog.Debug(tag, $"AlphaFunctionGetBuiltinFunction START");
+
+ var testingTarget = new AlphaFunction();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.GetBuiltinFunction();
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsTrue(result == Tizen.NUI.AlphaFunction.BuiltinFunctions.Default);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlphaFunctionGetBuiltinFunction END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("AlphaFunction.GetMode method")]
+ [Property("SPEC", "Tizen.NUI.AlphaFunction.GetMode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AlphaFunctionGetMode()
+ {
+ tlog.Debug(tag, $"AlphaFunctionGetMode START");
+
+ var testingTarget = new AlphaFunction();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.GetMode();
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsTrue(result == Tizen.NUI.AlphaFunction.Modes.BuiltinFunction);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AlphaFunctionGetMode END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/Animatable")]
+ public class PublicAnimatableTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable constructor")]
+ [Property("SPEC", "Tizen.NUI.Animatable.Animatable C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableConstructor()
+ {
+ tlog.Debug(tag, $"AnimatableConstructor START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of Animatable class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable GetPropertyName")]
+ [Property("SPEC", "Tizen.NUI.Animatable.GetPropertyName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableGetPropertyName()
+ {
+ tlog.Debug(tag, $"AnimatableGetPropertyName START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of ImageView class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6));
+ var index = testingTarget.GetPropertyIndex("dummy");
+ var result = testingTarget.GetPropertyName(index);
+ Assert.AreEqual("dummy", result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableGetPropertyName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable GetPropertyIndex")]
+ [Property("SPEC", "Tizen.NUI.Animatable.GetPropertyIndex M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableGetPropertyIndex()
+ {
+ tlog.Debug(tag, $"AnimatableGetPropertyIndex START");
+
+ var view = new ImageView();
+ Assert.IsNotNull(view, "should be not null");
+ Assert.IsInstanceOf<ImageView>(view, "should be an instance of ImageView class!");
+
+ int index = view.GetPropertyIndex("image");
+ Assert.IsTrue(10001001 == index);
+
+ view.Dispose();
+ tlog.Debug(tag, $"AnimatableGetPropertyIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable IsPropertyWritable")]
+ [Property("SPEC", "Tizen.NUI.Animatable.IsPropertyWritable M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableGetIsPropertyWritable()
+ {
+ tlog.Debug(tag, $"AnimatableGetIsPropertyWritable START");
+
+ var view = new ImageView();
+ Assert.IsNotNull(view, "should be not null");
+ Assert.IsInstanceOf<ImageView>(view, "should be an instance of ImageView class!");
+
+ int index = view.GetPropertyIndex("image");
+ Assert.IsTrue(10001001 == index);
+
+ var result = view.IsPropertyWritable(index);
+ Assert.IsTrue(result);
+
+ view.Dispose();
+ tlog.Debug(tag, $"AnimatableGetIsPropertyWritable END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable IsPropertyAnimatable")]
+ [Property("SPEC", "Tizen.NUI.Animatable.IsPropertyAnimatable M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableGetIsPropertyAnimatable()
+ {
+ tlog.Debug(tag, $"AnimatableGetIsPropertyAnimatable START");
+
+ var view = new ImageView();
+ Assert.IsNotNull(view, "should be not null");
+ Assert.IsInstanceOf<ImageView>(view, "should be an instance of ImageView class!");
+
+ int index = view.GetPropertyIndex("image");
+ Assert.IsTrue(10001001 == index);
+
+ var result = view.IsPropertyAnimatable(index);
+ Assert.IsFalse(result);
+
+ view.Dispose();
+ tlog.Debug(tag, $"AnimatableGetIsPropertyAnimatable END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable GetPropertyType")]
+ [Property("SPEC", "Tizen.NUI.Animatable.GetPropertyType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableGetGetPropertyType()
+ {
+ tlog.Debug(tag, $"AnimatableGetGetPropertyType START");
+
+ var view = new ImageView();
+ Assert.IsNotNull(view, "should be not null");
+ Assert.IsInstanceOf<ImageView>(view, "should be an instance of ImageView class!");
+
+ int index = view.GetPropertyIndex("image");
+ Assert.IsTrue(10001001 == index);
+
+ var result = view.GetPropertyType(index);
+ Assert.AreEqual(PropertyType.Map, result, "should be eaqual.");
+
+ view.Dispose();
+ tlog.Debug(tag, $"AnimatableGetGetPropertyType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable SetProperty")]
+ [Property("SPEC", "Tizen.NUI.Animatable.SetProperty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableSetProperty()
+ {
+ tlog.Debug(tag, $"AnimatableSetProperty START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of ImageView class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6));
+ var index = testingTarget.GetPropertyIndex("dummy");
+ testingTarget.SetProperty(index, new PropertyValue(8));
+ testingTarget.GetProperty(index).Get(out int result);
+ Assert.AreEqual(8, result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableSetProperty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable RegisterProperty")]
+ [Property("SPEC", "Tizen.NUI.Animatable.RegisterProperty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableRegisterProperty()
+ {
+ tlog.Debug(tag, $"AnimatableRegisterProperty START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of ImageView class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6));
+ var index = testingTarget.GetPropertyIndex("dummy");
+ testingTarget.GetProperty(index).Get(out int result);
+ Assert.AreEqual(6, result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableRegisterProperty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable RegisterProperty. With accessMode")]
+ [Property("SPEC", "Tizen.NUI.Animatable.RegisterProperty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableRegisterPropertyWithAccessMode()
+ {
+ tlog.Debug(tag, $"AnimatableRegisterPropertyWithAccessMode START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of ImageView class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6), PropertyAccessMode.Animatable);
+ var index = testingTarget.GetPropertyIndex("dummy");
+ testingTarget.GetProperty(index).Get(out int result);
+ Assert.AreEqual(6, result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableRegisterPropertyWithAccessMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable GetProperty")]
+ [Property("SPEC", "Tizen.NUI.Animatable.GetProperty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableGetProperty()
+ {
+ tlog.Debug(tag, $"AnimatableGetProperty START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of ImageView class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6), PropertyAccessMode.Animatable);
+ var index = testingTarget.GetPropertyIndex("dummy");
+ testingTarget.GetProperty(index).Get(out int result);
+ Assert.AreEqual(6, result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableGetProperty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable AddPropertyNotification")]
+ [Property("SPEC", "Tizen.NUI.Animatable.AddPropertyNotification M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableAddPropertyNotification()
+ {
+ tlog.Debug(tag, $"AnimatableAddPropertyNotification START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of Animatable class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6));
+ var result = testingTarget.AddPropertyNotification("dummy", PropertyCondition.GreaterThan(5));
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsInstanceOf<PropertyNotification>(result, "should be an instance of PropertyNotification class!");
+
+ result.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableAddPropertyNotification END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable RemovePropertyNotification")]
+ [Property("SPEC", "Tizen.NUI.Animatable.RemovePropertyNotification M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableRemovePropertyNotification()
+ {
+ tlog.Debug(tag, $"AnimatableRemovePropertyNotification START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of Animatable class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6));
+ var dummy = testingTarget.AddPropertyNotification("dummy", PropertyCondition.GreaterThan(5));
+ Assert.IsNotNull(dummy, "should be not null");
+ Assert.IsInstanceOf<PropertyNotification>(dummy, "should be an instance of PropertyNotification class!");
+
+ try
+ {
+ testingTarget.RemovePropertyNotification(dummy);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableRemovePropertyNotification END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animatable RemovePropertyNotifications")]
+ [Property("SPEC", "Tizen.NUI.Animatable.RemovePropertyNotifications M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimatableRemovePropertyNotifications()
+ {
+ tlog.Debug(tag, $"AnimatableRemovePropertyNotifications START");
+
+ var testingTarget = new Animatable();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animatable>(testingTarget, "should be an instance of Animatable class!");
+
+ testingTarget.RegisterProperty("dummy", new PropertyValue(6));
+ var dummy = testingTarget.AddPropertyNotification("dummy", PropertyCondition.GreaterThan(5));
+ Assert.IsNotNull(dummy, "should be not null");
+ Assert.IsInstanceOf<PropertyNotification>(dummy, "should be an instance of PropertyNotification class!");
+
+ var dummy2 = testingTarget.AddPropertyNotification("dummy", PropertyCondition.LessThan(10));
+ Assert.IsNotNull(dummy2, "should be not null");
+ Assert.IsInstanceOf<PropertyNotification>(dummy2, "should be an instance of PropertyNotification class!");
+
+ try
+ {
+ testingTarget.RemovePropertyNotifications();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimatableRemovePropertyNotifications END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using static Tizen.NUI.Animation;
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/Animation")]
+ class PublicAnimationTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation constructor")]
+ [Property("SPEC", "Tizen.NUI.Animation.Animation C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationConstructor()
+ {
+ tlog.Debug(tag, $"AnimationConstructor START");
+
+ var testingTarget = new Animation(2000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Duration. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.Duration A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationDurationGet()
+ {
+ tlog.Debug(tag, $"AnimationDurationGet START");
+
+ var testingTarget = new Animation(2000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.Duration;
+ Assert.AreEqual(2000, result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationDurationGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Duration. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.Duration A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationDurationSet()
+ {
+ tlog.Debug(tag, $"AnimationDurationSet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.Duration = 2000;
+ var result = testingTarget.Duration;
+ Assert.AreEqual(2000, result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationDurationSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation DefaultAlphaFunction. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.DefaultAlphaFunction A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationDefaultAlphaFunctionGet()
+ {
+ tlog.Debug(tag, $"AnimationDefaultAlphaFunctionGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.DefaultAlphaFunction;
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(result, "should be an instance of AlphaFunction class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationDefaultAlphaFunctionGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation DefaultAlphaFunction. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.DefaultAlphaFunction A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationDefaultAlphaFunctionSet()
+ {
+ tlog.Debug(tag, $"AnimationDefaultAlphaFunctionSet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.DefaultAlphaFunction = new AlphaFunction(AlphaFunction.BuiltinFunctions.Bounce);
+ var result = testingTarget.DefaultAlphaFunction;
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsInstanceOf<AlphaFunction>(result, "should be an instance of AlphaFunction class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationDefaultAlphaFunctionSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation State")]
+ [Property("SPEC", "Tizen.NUI.Animation.State A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationState()
+ {
+ tlog.Debug(tag, $"AnimationState START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.State;
+ Assert.AreEqual("Stopped", result.ToString(), "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationState END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation LoopCount. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.LoopCount A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationLoopCountGet()
+ {
+ tlog.Debug(tag, $"AnimationLoopCountGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.LoopCount;
+ Assert.IsTrue(1 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationLoopCountGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation LoopCount. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.LoopCount A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationLoopCountSet()
+ {
+ tlog.Debug(tag, $"AnimationLoopCountSet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.LoopCount = 3;
+ var result = testingTarget.LoopCount;
+ Assert.IsTrue(3 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationLoopCountSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Looping. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.Looping A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationLoopingGet()
+ {
+ tlog.Debug(tag, $"AnimationLoopingGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.Looping;
+ Assert.IsFalse(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationLoopingGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Looping. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.Looping A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationLoopingSet()
+ {
+ tlog.Debug(tag, $"AnimationLoopingSet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.Looping = true;
+ var result = testingTarget.Looping;
+ Assert.IsTrue(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationLoopingSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation EndAction. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.EndAction A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationEndActionGet()
+ {
+ tlog.Debug(tag, $"AnimationEndActionGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.EndAction;
+ Assert.IsTrue(EndActions.Cancel == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationEndActionGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation EndAction. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.EndAction A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationEndActionSet()
+ {
+ tlog.Debug(tag, $"AnimationEndActionSet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.Discard;
+ var result = testingTarget.EndAction;
+ Assert.IsTrue(EndActions.Discard == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationEndActionSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation CurrentLoop")]
+ [Property("SPEC", "Tizen.NUI.Animation.CurrentLoop A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationCurrentLoop()
+ {
+ tlog.Debug(tag, $"AnimationCurrentLoop START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.CurrentLoop;
+ Assert.IsTrue(0 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationCurrentLoop END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation DisconnectAction. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.DisconnectAction A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationDisconnectActionGet()
+ {
+ tlog.Debug(tag, $"AnimationDisconnectActionGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.DisconnectAction;
+ Assert.IsTrue(EndActions.StopFinal == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationDisconnectActionGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation DisconnectAction. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.DisconnectAction A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationDisconnectActionSet()
+ {
+ tlog.Debug(tag, $"AnimationDisconnectActionSet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.DisconnectAction = Animation.EndActions.Cancel;
+ var result = testingTarget.EndAction;
+ Assert.IsTrue(EndActions.Cancel == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationDisconnectActionSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation CurrentProgress. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.CurrentProgress A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationCurrentProgressGet()
+ {
+ tlog.Debug(tag, $"AnimationCurrentProgressGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.CurrentProgress;
+ Assert.IsTrue(0 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationCurrentProgressGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation CurrentProgress. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.CurrentProgress A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationCurrentProgressSet()
+ {
+ tlog.Debug(tag, $"AnimationCurrentProgressSet START");
+
+ var testingTarget = new Animation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.CurrentProgress = 0.3f;
+ float result = testingTarget.CurrentProgress;
+ Assert.IsTrue(0 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationCurrentProgressSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation SpeedFactor. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.SpeedFactor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationSpeedFactorGet()
+ {
+ tlog.Debug(tag, $"AnimationSpeedFactorGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.SpeedFactor;
+ Assert.IsTrue(1 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationSpeedFactorGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation SpeedFactor. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.SpeedFactor A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationSpeedFactorSet()
+ {
+ tlog.Debug(tag, $"AnimationSpeedFactorSet START");
+
+ var testingTarget = new Animation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.SpeedFactor = 2;
+ float result = testingTarget.SpeedFactor;
+ Assert.IsTrue(2 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationSpeedFactorSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation PlayRange. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.PlayRange A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationPlayRangeGet()
+ {
+ tlog.Debug(tag, $"AnimationPlayRangeGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.PlayRange;
+ Assert.IsTrue(0 == result.X);
+ Assert.IsTrue(1 == result.Y);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPlayRangeGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation PlayRange. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.PlayRange A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationPlayRangeSet()
+ {
+ tlog.Debug(tag, $"AnimationPlayRangeSet START");
+
+ var testingTarget = new Animation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.PlayRange = new RelativeVector2(0.3f, 0.5f);
+ var result = testingTarget.PlayRange;
+ Assert.IsTrue(0.3f == result.X);
+ Assert.IsTrue(0.5f == result.Y);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPlayRangeSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation ProgressNotification. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.ProgressNotification A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationProgressNotificationGet()
+ {
+ tlog.Debug(tag, $"AnimationProgressNotificationGet START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ var result = testingTarget.ProgressNotification;
+ Assert.IsTrue(0 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationProgressNotificationGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation ProgressNotification. Set")]
+ [Property("SPEC", "Tizen.NUI.Animation.ProgressNotification A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationProgressNotificationSet()
+ {
+ tlog.Debug(tag, $"AnimationProgressNotificationSet START");
+
+ var testingTarget = new Animation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.ProgressNotification = 0.3f;
+ var result = testingTarget.ProgressNotification;
+ Assert.IsTrue(0.3f == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationProgressNotificationSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation PropertyList. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.PropertyList A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationPropertyList()
+ {
+ tlog.Debug(tag, $"AnimationPropertyList START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ TransitionAnimation transition = new TransitionAnimation(300);
+ ImageView view = new ImageView();
+ view.ApplyStyle(transition.DefaultImageStyle.Clone());
+
+ var dummy = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ transition.AddAnimationData(dummy);
+
+ for (int i = 0; i < transition.AnimationDataList.Count; i++)
+ {
+ testingTarget.PropertyList.Add(transition.AnimationDataList[i].Property);
+ testingTarget.DestValueList.Add(transition.AnimationDataList[i].DestinationValue);
+ testingTarget.StartTimeList.Add(transition.AnimationDataList[i].StartTime);
+ testingTarget.EndTimeList.Add(transition.AnimationDataList[i].EndTime);
+ }
+
+ var result = testingTarget.PropertyList[0];
+ Assert.IsTrue("Size" == result);
+
+ view.Dispose();
+ transition.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPropertyList END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation DestValueList. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.DestValueList A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationDestValueList()
+ {
+ tlog.Debug(tag, $"AnimationDestValueList START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ TransitionAnimation transition = new TransitionAnimation(300);
+ ImageView view = new ImageView();
+ view.ApplyStyle(transition.DefaultImageStyle.Clone());
+
+ var dummy = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ transition.AddAnimationData(dummy);
+
+ for (int i = 0; i < transition.AnimationDataList.Count; i++)
+ {
+ testingTarget.PropertyList.Add(transition.AnimationDataList[i].Property);
+ testingTarget.DestValueList.Add(transition.AnimationDataList[i].DestinationValue);
+ testingTarget.StartTimeList.Add(transition.AnimationDataList[i].StartTime);
+ testingTarget.EndTimeList.Add(transition.AnimationDataList[i].EndTime);
+ }
+
+ var result = testingTarget.DestValueList[0];
+ Assert.IsTrue("100, 100" == result);
+
+ view.Dispose();
+ transition.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationDestValueList END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation StartTimeList. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.StartTimeList A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationStartTimeList()
+ {
+ tlog.Debug(tag, $"AnimationStartTimeList START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ TransitionAnimation transition = new TransitionAnimation(300);
+ ImageView view = new ImageView();
+ view.ApplyStyle(transition.DefaultImageStyle.Clone());
+
+ var dummy = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ transition.AddAnimationData(dummy);
+
+ for (int i = 0; i < transition.AnimationDataList.Count; i++)
+ {
+ testingTarget.PropertyList.Add(transition.AnimationDataList[i].Property);
+ testingTarget.DestValueList.Add(transition.AnimationDataList[i].DestinationValue);
+ testingTarget.StartTimeList.Add(transition.AnimationDataList[i].StartTime);
+ testingTarget.EndTimeList.Add(transition.AnimationDataList[i].EndTime);
+ }
+
+ var result = testingTarget.StartTimeList[0];
+ Assert.IsTrue(300 == result);
+
+ view.Dispose();
+ transition.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationStartTimeList END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation EndTimeList. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.EndTimeList A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationEndTimeList()
+ {
+ tlog.Debug(tag, $"AnimationEndTimeList START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ TransitionAnimation transition = new TransitionAnimation(300);
+ ImageView view = new ImageView();
+ view.ApplyStyle(transition.DefaultImageStyle.Clone());
+
+ var dummy = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ transition.AddAnimationData(dummy);
+
+ for (int i = 0; i < transition.AnimationDataList.Count; i++)
+ {
+ testingTarget.PropertyList.Add(transition.AnimationDataList[i].Property);
+ testingTarget.DestValueList.Add(transition.AnimationDataList[i].DestinationValue);
+ testingTarget.StartTimeList.Add(transition.AnimationDataList[i].StartTime);
+ testingTarget.EndTimeList.Add(transition.AnimationDataList[i].EndTime);
+ }
+
+ var result = testingTarget.EndTimeList[0];
+ Assert.IsTrue(600 == result);
+
+ view.Dispose();
+ transition.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationEndTimeList END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Stop. Get")]
+ [Property("SPEC", "Tizen.NUI.Animation.Stop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationStop()
+ {
+ tlog.Debug(tag, $"AnimationStop START");
+
+ var testingTarget = new Animation();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.Stop(EndActions.Discard);
+ var result = testingTarget.EndAction;
+ Assert.IsTrue(EndActions.Discard == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationStop END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimateBy")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimateBy()
+ {
+ tlog.Debug(tag, $"AnimationAnimateBy START");
+
+ View view = new View()
+ {
+ Position = new Position(0, 0)
+ };
+ Window.Instance.Add(view);
+ Assert.IsTrue(0 == view.Position.X);
+ Assert.IsTrue(0 == view.Position.Y);
+
+ var testingTarget = new Animation(1500);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
+ testingTarget.AnimateBy(view, "Position", new Position(100, 150));
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.Play();
+
+ Assert.IsTrue(100 == view.Position.X);
+ Assert.IsTrue(150 == view.Position.Y);
+
+ view.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationAnimateBy END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimateBy. With start time and end time")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimateBy M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimateByWithStartTimeAndEndTime()
+ {
+ tlog.Debug(tag, $"AnimationAnimateByWithStartTimeAndEndTime START");
+
+ var view = new View()
+ {
+ Position = new Position(0, 0)
+ };
+ Window.Instance.Add(view);
+ Assert.AreEqual(0, view.Position.X, "sholud be eaqual.");
+ Assert.AreEqual(0, view.Position.Y, "sholud be eaqual.");
+
+ var testingTarget = new Animation(1500);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
+ testingTarget.AnimateBy(view, "Position", new Position(100, 150), 0, 0);
+ testingTarget.AnimateBy(view, "Position", new Position(300, 200), 0, 300);
+
+ testingTarget.Play();
+ Assert.AreEqual(400, view.Position.X, "sholud be eaqual.");
+ Assert.AreEqual(350, view.Position.Y, "sholud be eaqual.");
+
+ view.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationAnimateByWithStartTimeAndEndTime END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimateTo")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimateTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimateTo()
+ {
+ tlog.Debug(tag, $"AnimationAnimateTo START");
+
+ var view = new View()
+ {
+ Position = new Position(0, 0)
+ };
+ Window.Instance.Add(view);
+ Assert.AreEqual(0, view.Position.X, "sholud be eaqual.");
+ Assert.AreEqual(0, view.Position.Y, "sholud be eaqual.");
+
+ var testingTarget = new Animation(1500);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
+ testingTarget.AnimateTo(view, "Position", new Position(100, 150));
+
+ testingTarget.Play();
+ Assert.AreEqual(100, view.Position.X, "sholud be eaqual.");
+ Assert.AreEqual(150, view.Position.Y, "sholud be eaqual.");
+
+ view.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationAnimateTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimateTo. With start time and end time")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimateTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimateToWithStartTimeAndEndTime()
+ {
+ tlog.Debug(tag, $"AnimationAnimateToWithStartTimeAndEndTime START");
+
+ var view = new View()
+ {
+ Position = new Position(0, 0)
+ };
+ Window.Instance.Add(view);
+ Assert.AreEqual(0, view.Position.X, "sholud be eaqual.");
+ Assert.AreEqual(0, view.Position.Y, "sholud be eaqual.");
+
+ var testingTarget = new Animation(1500);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1));
+ testingTarget.AnimateTo(view, "Position", new Position(100, 150), 0, 0);
+ testingTarget.AnimateTo(view, "Position", new Position(300, 200), 0, 300);
+
+ testingTarget.Play();
+ Assert.AreEqual(300, view.Position.X, "sholud be eaqual.");
+ Assert.AreEqual(200, view.Position.Y, "sholud be eaqual.");
+
+ view.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationAnimateToWithStartTimeAndEndTime END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation PlayAnimateTo")]
+ [Property("SPEC", "Tizen.NUI.Animation.PlayAnimateTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationPlayAnimateTo()
+ {
+ tlog.Debug(tag, $"AnimationPlayAnimateTo START");
+
+ var testingTarget = new Animation(1500);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ TransitionAnimation transition = new TransitionAnimation(300);
+ ImageView view = new ImageView();
+ view.ApplyStyle(transition.DefaultImageStyle.Clone());
+
+ var dummy1 = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ transition.AddAnimationData(dummy1);
+
+ var dummy2 = new TransitionAnimationData()
+ {
+ Property = "Position",
+ DestinationValue = "150, 250",
+ StartTime = 300,
+ EndTime = 600
+ };
+ transition.AddAnimationData(dummy2);
+
+ for (int i = 0; i < transition.AnimationDataList.Count; i++)
+ {
+ testingTarget.PropertyList.Add(transition.AnimationDataList[i].Property);
+ testingTarget.DestValueList.Add(transition.AnimationDataList[i].DestinationValue);
+ testingTarget.StartTimeList.Add(transition.AnimationDataList[i].StartTime);
+ testingTarget.EndTimeList.Add(transition.AnimationDataList[i].EndTime);
+ }
+ testingTarget.PlayAnimateTo(view);
+
+ view.Dispose();
+ transition.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPlayAnimateTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimateBetween")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimateBetween M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimateBetween()
+ {
+ tlog.Debug(tag, $"AnimationAnimateBetween START");
+
+ View view = new View()
+ {
+ Opacity = 0.0f
+ };
+
+ var keyFrames = new KeyFrames();
+ Assert.IsNotNull(keyFrames, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(keyFrames, "should be an instance of Animation class!");
+ keyFrames.Add(0.0f, 1.0f);
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.AnimateBetween(view, "Opacity", keyFrames);
+
+ testingTarget.Dispose();
+ keyFrames.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"AnimationAnimateBetween END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimateBetween. With start time and end time")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimateBetween M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimateBetweenWithStartTimeAndEndTime()
+ {
+ tlog.Debug(tag, $"AnimationAnimateBetweenWithStartTimeAndEndTime START");
+
+ View view = new View()
+ {
+ Opacity = 0.0f
+ };
+
+ var keyFrames = new KeyFrames();
+ Assert.IsNotNull(keyFrames, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(keyFrames, "should be an instance of Animation class!");
+ keyFrames.Add(0.0f, 1.0f);
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.AnimateBetween(view, "Opacity", keyFrames, 0, 600);
+
+ testingTarget.Dispose();
+ keyFrames.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"AnimationAnimateBetweenWithStartTimeAndEndTime END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimatePath")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimatePath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimatePath()
+ {
+ tlog.Debug(tag, $"AnimationAnimatePath START");
+
+ View view = new View()
+ {
+ Size = new Size(200, 300)
+ };
+
+ Path path = new Path();
+ PropertyArray points = new PropertyArray();
+ points.PushBack(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
+ points.PushBack(new PropertyValue(new Vector3(0.9f, 0.3f, 0.0f)));
+ path.Points = points;
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.AnimatePath(view, path, new Vector3(0.0f, 0.6f, 1.2f));
+
+ testingTarget.Dispose();
+ points.Dispose();
+ path.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"AnimationAnimatePath END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation AnimatePath. With start time and end time")]
+ [Property("SPEC", "Tizen.NUI.Animation.AnimatePath M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationAnimatePathWithStartTimeAndEndTime()
+ {
+ tlog.Debug(tag, $"AnimationAnimatePathWithStartTimeAndEndTime START");
+
+ View view = new View()
+ {
+ Size = new Size(200, 300)
+ };
+
+ Path path = new Path();
+ PropertyArray points = new PropertyArray();
+ points.PushBack(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
+ points.PushBack(new PropertyValue(new Vector3(0.9f, 0.3f, 0.0f)));
+ path.Points = points;
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.AnimatePath(view, path, new Vector3(0.0f, 0.6f, 1.2f), 0, 600);
+
+ testingTarget.Dispose();
+ points.Dispose();
+ path.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"AnimationAnimatePathWithStartTimeAndEndTime END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Play")]
+ [Property("SPEC", "Tizen.NUI.Animation.Play M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationPlay()
+ {
+ tlog.Debug(tag, $"AnimationPlay START");
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ try
+ {
+ testingTarget.Play();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPlay END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation PlayFrom")]
+ [Property("SPEC", "Tizen.NUI.Animation.PlayFrom M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationPlayFrom()
+ {
+ tlog.Debug(tag, $"AnimationPlayFrom START");
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ try
+ {
+ testingTarget.PlayFrom(0.3f);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPlayFrom END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation PlayAfter")]
+ [Property("SPEC", "Tizen.NUI.Animation.PlayAfter M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationPlayAfter()
+ {
+ tlog.Debug(tag, $"AnimationPlayAfter START");
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ try
+ {
+ testingTarget.PlayAfter(300);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPlayAfter END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Pause")]
+ [Property("SPEC", "Tizen.NUI.Animation.Pause M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task AnimationPause()
+ {
+ tlog.Debug(tag, $"AnimationPause START");
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.Play();
+ await Task.Delay(200);
+ testingTarget.Pause();
+ var result = testingTarget.GetState();
+ Assert.IsTrue(States.Paused == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationPause END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Animation Clear")]
+ [Property("SPEC", "Tizen.NUI.Animation.Stop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void AnimationClear()
+ {
+ tlog.Debug(tag, $"AnimationClear START");
+
+ var testingTarget = new Animation(600);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Animation>(testingTarget, "should be an instance of Animation class!");
+
+ testingTarget.EndAction = Animation.EndActions.StopFinal;
+ testingTarget.Play();
+
+ try
+ {
+ testingTarget.Clear();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"AnimationClear END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/KeyFrames")]
+ public class PublicKeyFramesTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyFrames constructor")]
+ [Property("SPEC", "Tizen.NUI.KeyFrames.KeyFrames C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyFramesConstructor()
+ {
+ tlog.Debug(tag, $"KeyFramesConstructor START");
+
+ var testingTarget = new KeyFrames();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"KeyFramesConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyFrames Add. Add a key frame with object value ")]
+ [Property("SPEC", "Tizen.NUI.KeyFrames.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyFramesAddWithObject()
+ {
+ tlog.Debug(tag, $"KeyFramesAddWithObject START");
+
+ var testingTarget = new KeyFrames();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");
+
+ Position pos = new Position(10.0f, 20.0f, 30.0f);
+ testingTarget.Add(0.3f, pos);
+
+ var result = testingTarget.GetType().ToString();
+ Assert.IsTrue("Vector3" == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"KeyFramesAddWithObject END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyFrames Add. Add a key frame with object value and alpha function")]
+ [Property("SPEC", "Tizen.NUI.KeyFrames.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyFramesAddWithObjectAndAlphaFunc()
+ {
+ tlog.Debug(tag, $"KeyFramesAddWithObjectAndAlphaFunc START");
+
+ var testingTarget = new KeyFrames();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");
+
+ Position pos = new Position(10.0f, 20.0f, 30.0f);
+ AlphaFunction linear = new AlphaFunction(AlphaFunction.BuiltinFunctions.Linear);
+ try
+ {
+ testingTarget.Add(0.3f, pos, linear);
+ Assert.IsTrue("Vector3" == testingTarget.GetType().ToString());
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ pos.Dispose();
+ linear.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"KeyFramesAddWithObjectAndAlphaFunc END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyFrames GetType")]
+ [Property("SPEC", "Tizen.NUI.KeyFrames.GetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyFramesGetType()
+ {
+ tlog.Debug(tag, $"KeyFramesGetType START");
+
+ var testingTarget = new KeyFrames();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");
+
+ Color color = Color.Yellow;
+ testingTarget.Add(0.3f, color);
+
+ var result = testingTarget.GetType().ToString();
+ Assert.IsTrue("Vector4" == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"KeyFramesGetType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyFrames Add. Add a key frame with property value ")]
+ [Property("SPEC", "Tizen.NUI.KeyFrames.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyFramesAddWithPropertyValue()
+ {
+ tlog.Debug(tag, $"KeyFramesAddWithPropertyValue START");
+
+ var testingTarget = new KeyFrames();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");
+
+ PropertyValue dummy = new PropertyValue(true);
+ testingTarget.Add(0.3f, dummy);
+
+ var result = testingTarget.GetType().ToString();
+ Assert.IsTrue("Boolean" == result);
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"KeyFramesAddWithPropertyValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("KeyFrames Add. Add a key frame with object property and alpha function")]
+ [Property("SPEC", "Tizen.NUI.KeyFrames.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void KeyFramesAddWithPropertyValueAndAlphaFunc()
+ {
+ tlog.Debug(tag, $"KeyFramesAddWithPropertyValueAndAlphaFunc START");
+
+ var testingTarget = new KeyFrames();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<KeyFrames>(testingTarget, "should be an instance of KeyFrames class!");
+
+ PropertyValue dummy = new PropertyValue(true);
+ AlphaFunction ease = new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseOut);
+ try
+ {
+ testingTarget.Add(0.3f, dummy, ease);
+ Assert.IsTrue("Boolean" == testingTarget.GetType().ToString());
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ dummy.Dispose();
+ ease.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"KeyFramesAddWithPropertyValueAndAlphaFunc END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/Path")]
+ public class PublicPathTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path constructor")]
+ [Property("SPEC", "Tizen.NUI.Path.Path C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathConstructor()
+ {
+ tlog.Debug(tag, $"PathConstructor START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path Points. Get")]
+ [Property("SPEC", "Tizen.NUI.Path.Points A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathPointsGet()
+ {
+ tlog.Debug(tag, $"PathPointsGet START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ PropertyArray dummy = new PropertyArray();
+ dummy.Add(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
+
+ testingTarget.Points = dummy;
+ Vector3 vec = new Vector3(0, 0, 0);
+ var result = testingTarget.Points[0].Get(vec); //Get
+ Assert.IsTrue(0.5f == vec.X);
+ Assert.IsTrue(0.0f == vec.Y);
+ Assert.IsTrue(0.8f == vec.Z);
+
+ dummy.Dispose();
+ vec.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathPointsGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path Points. Set")]
+ [Property("SPEC", "Tizen.NUI.Path.Points A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathPointsSet()
+ {
+ tlog.Debug(tag, $"PathPointsSet START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ PropertyArray dummy = new PropertyArray();
+ dummy.Add(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
+
+ testingTarget.Points = dummy; //Set
+ Vector3 vec = new Vector3(0, 0, 0);
+ var result = testingTarget.Points[0].Get(vec);
+ Assert.IsTrue(0.5f == vec.X);
+ Assert.IsTrue(0.0f == vec.Y);
+ Assert.IsTrue(0.8f == vec.Z);
+
+ dummy.Dispose();
+ vec.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathPointsSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path ControlPoints. Get")]
+ [Property("SPEC", "Tizen.NUI.Path.ControlPoints A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathControlPointsGet()
+ {
+ tlog.Debug(tag, $"PathControlPointsGet START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ PropertyArray dummy = new PropertyArray();
+ dummy.Add(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
+
+ testingTarget.ControlPoints = dummy; //Set
+ Vector3 vec = new Vector3(0, 0, 0);
+ var result = testingTarget.ControlPoints[0].Get(vec);
+ Assert.IsTrue(0.5f == vec.X);
+ Assert.IsTrue(0.0f == vec.Y);
+ Assert.IsTrue(0.8f == vec.Z);
+
+ dummy.Dispose();
+ vec.Dispose();
+ tlog.Debug(tag, $"PathControlPointsGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path ControlPoints. Set")]
+ [Property("SPEC", "Tizen.NUI.Path.ControlPoints A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathControlPointsSet()
+ {
+ tlog.Debug(tag, $"PathControlPointsSet START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ PropertyArray dummy = new PropertyArray();
+ dummy.Add(new PropertyValue(new Vector3(0.5f, 0.0f, 0.8f)));
+
+ testingTarget.ControlPoints = dummy; //Set
+ Vector3 vec = new Vector3(0, 0, 0);
+ var result = testingTarget.ControlPoints[0].Get(vec);
+ Assert.IsTrue(0.5f == vec.X);
+ Assert.IsTrue(0.0f == vec.Y);
+ Assert.IsTrue(0.8f == vec.Z);
+
+ dummy.Dispose();
+ vec.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathControlPointsSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path AddPoints")]
+ [Property("SPEC", "Tizen.NUI.Path.AddPoints M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathAddPoints()
+ {
+ tlog.Debug(tag, $"PathAddPoints START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ Position dummy = new Position(0.5f, 0.0f, 0.8f);
+ testingTarget.AddPoint(dummy);
+
+ Vector3 vec = new Vector3(0, 0, 0);
+ var result = testingTarget.Points[0].Get(vec);
+ Assert.IsTrue(0.5f == vec.X);
+ Assert.IsTrue(0.0f == vec.Y);
+ Assert.IsTrue(0.8f == vec.Z);
+
+ dummy.Dispose();
+ vec.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathAddPoints END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path AddControlPoint")]
+ [Property("SPEC", "Tizen.NUI.Path.AddControlPoint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathAddControlPoint()
+ {
+ tlog.Debug(tag, $"PathAddControlPoint START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ Position dummy = new Vector3(0.5f, 0.0f, 0.8f);
+ testingTarget.AddControlPoint(dummy);
+
+ Vector3 vec = new Vector3(0, 0, 0);
+ testingTarget.ControlPoints[0].Get(vec);
+ Assert.IsTrue(0.5f == vec.X);
+ Assert.IsTrue(0.0f == vec.Y);
+ Assert.IsTrue(0.8f == vec.Z);
+
+ dummy.Dispose();
+ vec.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathAddControlPoint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path GenerateControlPoints")]
+ [Property("SPEC", "Tizen.NUI.Path.GenerateControlPoints M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathGenerateControlPoints()
+ {
+ tlog.Debug(tag, $"PathGenerateControlPoints START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ var points = new PropertyArray();
+ Assert.IsNotNull(points, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(points, "should be an instance of PropertyArray class!");
+ points.PushBack(new PropertyValue(new Vector3(1920 * 0.5f, 0.0f, 1920 * 0.5f)));
+ points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
+ points.PushBack(new PropertyValue(new Vector3(-1920 * 0.5f, 0.0f, 1920 * 0.5f)));
+ testingTarget.Points = points;
+
+ testingTarget.GenerateControlPoints(0.5f);
+ Vector3 vec = new Vector3(0, 0, 0);
+ var result = testingTarget.ControlPoints[0].Get(vec);
+ Assert.IsTrue(480 == vec.X);
+ Assert.IsTrue(0 == vec.Y);
+ Assert.IsTrue(480 == vec.Z);
+
+ points.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathGenerateControlPoints END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path Sample")]
+ [Property("SPEC", "Tizen.NUI.Path.Sample M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathSample()
+ {
+ tlog.Debug(tag, $"PathSample START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ Vector2 stageSize = Window.Instance.WindowSize;
+
+ var points = new PropertyArray();
+ Assert.IsNotNull(points, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(points, "should be an instance of PropertyArray class!");
+ points.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
+ points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
+ points.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
+ testingTarget.Points = points;
+
+ var controlPoints = new PropertyArray();
+ Assert.IsNotNull(controlPoints, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(controlPoints, "should be an instance of PropertyArray class!");
+ controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
+ controlPoints.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.3f, 0.0f, 0.0f)));
+ controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.3f, 0.0f, 0.0f)));
+ controlPoints.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.3f)));
+ testingTarget.ControlPoints = controlPoints;
+
+ var progress = 0.0f;
+ var position = new Position(0.0f, 0.0f, 0.0f);
+ var tangent = new Vector3(0.0f, 0.0f, 0.0f);
+ try
+ {
+ testingTarget.Sample(progress, position, tangent);
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ position.Dispose();
+ tangent.Dispose();
+ points.Dispose();
+ controlPoints.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathSample END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path GetPoint")]
+ [Property("SPEC", "Tizen.NUI.Path.GetPoint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathGetPoint()
+ {
+ tlog.Debug(tag, $"PathGetPoint START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ var points = new PropertyArray();
+ Assert.IsNotNull(points, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(points, "should be an instance of PropertyArray class!");
+ points.PushBack(new PropertyValue(new Vector3(1920 * 0.5f, 0.0f, 1920 * 0.5f)));
+ points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
+ points.PushBack(new PropertyValue(new Vector3(-1920 * 0.5f, 0.0f, 1920 * 0.5f)));
+ testingTarget.Points = points;
+
+ var result = testingTarget.GetPoint(2);
+ Assert.IsTrue(-960 == result.X);
+ Assert.IsTrue(0 == result.Y);
+ Assert.IsTrue(960 == result.Z);
+
+ points.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathGetPoint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path GetControlPoint")]
+ [Property("SPEC", "Tizen.NUI.Path.GetControlPoint M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathGetControlPoint()
+ {
+ tlog.Debug(tag, $"PathGetControlPoint START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ var points = new PropertyArray();
+ Assert.IsNotNull(points, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(points, "should be an instance of PropertyArray class!");
+ points.PushBack(new PropertyValue(new Vector3(1920 * 0.5f, 0.0f, 1920 * 0.5f)));
+ points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
+ points.PushBack(new PropertyValue(new Vector3(-1920 * 0.5f, 0.0f, 1920 * 0.5f)));
+ testingTarget.Points = points;
+
+ testingTarget.GenerateControlPoints(0.5f);
+ var result = testingTarget.GetControlPoint(1);
+ Assert.IsTrue(678.8225 == result.X);
+ Assert.IsTrue(0 == result.Y);
+ Assert.IsTrue(0 == result.Z);
+
+ points.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathGetControlPoint END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Path GetPointCount")]
+ [Property("SPEC", "Tizen.NUI.Path.GetPointCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PathGetPointCount()
+ {
+ tlog.Debug(tag, $"PathGetPointCount START");
+
+ var testingTarget = new Path();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Path>(testingTarget, "should be an instance of Path class!");
+
+ Vector2 stageSize = Window.Instance.WindowSize;
+
+ var points = new PropertyArray();
+ Assert.IsNotNull(points, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(points, "should be an instance of PropertyArray class!");
+ points.PushBack(new PropertyValue(new Vector3(stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
+ points.PushBack(new PropertyValue(new Vector3(0.0f, 0.0f, 0.0f)));
+ points.PushBack(new PropertyValue(new Vector3(-stageSize.X * 0.5f, 0.0f, stageSize.X * 0.5f)));
+ testingTarget.Points = points;
+
+ var result = testingTarget.GetPointCount();
+ Assert.IsTrue(3 == result);
+
+ points.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PathGetPointCount END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/TransitionAnimations")]
+ public class PublicTransitionAnimationsTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations constructor")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimations C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationConstructor()
+ {
+ tlog.Debug(tag, $"TransitionAnimationConstructor START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations DurationMilliSeconds. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.DurationMilliSeconds A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDurationMilliSecondsGet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDurationMilliSecondsGet START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ var result = testingTarget.DurationMilliSeconds;
+ Assert.IsTrue(3000 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationDurationMilliSecondsGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations DurationMilliSeconds. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.DurationMilliSeconds A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDurationMilliSecondsSet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDurationMilliSecondsSet START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ testingTarget.DurationMilliSeconds = 600;
+ var result = testingTarget.DurationMilliSeconds;
+ Assert.IsTrue(600 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationDurationMilliSecondsSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations AnimationDataList")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.AnimationDataList A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationAnimationDataList()
+ {
+ tlog.Debug(tag, $"TransitionAnimationAnimationDataList START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ var result = testingTarget.AnimationDataList;
+ Assert.IsTrue(0 == result.Count);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationAnimationDataList END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations AddAnimationData")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.AddAnimationData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationAddAnimationData()
+ {
+ tlog.Debug(tag, $"TransitionAnimationAddAnimationData START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ var dummy = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ testingTarget.AddAnimationData(dummy);
+
+ var result = testingTarget.AnimationDataList;
+ Assert.IsTrue(1 == result.Count);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationAddAnimationData END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations RemoveAnimationData")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.RemoveAnimationData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationRemoveAnimationData()
+ {
+ tlog.Debug(tag, $"TransitionAnimationRemoveAnimationData START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ var dummy = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ testingTarget.AddAnimationData(dummy);
+
+ var result = testingTarget.AnimationDataList.Count;
+ Assert.IsTrue(1 == result);
+
+ testingTarget.RemoveAnimationData(dummy);
+ result = testingTarget.AnimationDataList.Count;
+ Assert.IsTrue(0 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationRemoveAnimationData END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations ClearAnimationData")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.ClearAnimationData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationClearAnimationData()
+ {
+ tlog.Debug(tag, $"TransitionAnimationClearAnimationData START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ var dummy = new TransitionAnimationData()
+ {
+ Property = "Size",
+ DestinationValue = "100, 100",
+ StartTime = 300,
+ EndTime = 600
+ };
+ testingTarget.AddAnimationData(dummy);
+
+ var result = testingTarget.AnimationDataList.Count;
+ Assert.IsTrue(1 == result);
+
+ testingTarget.ClearAnimationData();
+ result = testingTarget.AnimationDataList.Count;
+ Assert.IsTrue(0 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationClearAnimationData END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations DefaultImageStyle. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.DefaultImageStyle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDefaultImageStyleGet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDefaultImageStyleGet START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ var result = testingTarget.DefaultImageStyle;
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsInstanceOf<ImageViewStyle>(result, "should be an instance of ImageViewStyle class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationDefaultImageStyleGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations DefaultImageStyle. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.DefaultImageStyle A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDefaultImageStyleSet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDefaultImageStyleSet START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ var style = new ImageViewStyle()
+ {
+ Size = new Size(100, 100),
+ Position = new Position(150, 200),
+ };
+ testingTarget.DefaultImageStyle = style;
+ var result = testingTarget.DefaultImageStyle;
+ Assert.IsTrue(100 == result.Size.Width);
+ Assert.IsTrue(100 == result.Size.Height);
+ Assert.IsTrue(150 == result.Position.X);
+ Assert.IsTrue(200 == result.Position.Y);
+
+ style.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationDefaultImageStyleSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations Dispose. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.Dispose A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDispose()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDispose START");
+
+ var testingTarget = new TransitionAnimation(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionAnimation>(testingTarget, "should be an instance of TransitionAnimation class!");
+
+ try
+ {
+ testingTarget.Dispose();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"TransitionAnimationDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations SlideIn constructor")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.SlideIn C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationSlideIn()
+ {
+ tlog.Debug(tag, $"TransitionAnimationSlideIn START");
+
+ var testingTarget = new SlideIn(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<SlideIn>(testingTarget, "should be an instance of SlideIn class!");
+
+ var style = testingTarget.DefaultImageStyle;
+ var dummy = -Window.Instance.GetWindowSize().Width;
+
+ Assert.IsTrue(Window.Instance.GetWindowSize().Width == style.Size.Width);
+ Assert.IsTrue(Window.Instance.GetWindowSize().Height == style.Size.Height);
+ Assert.IsTrue(dummy == style.Position.X);
+ Assert.IsTrue(0 == style.Position.Y);
+
+ Assert.IsTrue(0 == testingTarget.AnimationDataList[0].StartTime);
+ Assert.IsTrue(3000 == testingTarget.AnimationDataList[0].EndTime);
+ Assert.IsTrue("PositionX" == testingTarget.AnimationDataList[0].Property);
+ Assert.IsTrue("0" == testingTarget.AnimationDataList[0].DestinationValue);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationSlideIn END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimations SlideOut constructor")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.SlideOut C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationSlideOut()
+ {
+ tlog.Debug(tag, $"TransitionAnimationSlideOut START");
+
+ var testingTarget = new SlideOut(3000);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<SlideOut>(testingTarget, "should be an instance of SlideOut class!");
+
+ var style = testingTarget.DefaultImageStyle;
+
+ Assert.IsTrue(Window.Instance.GetWindowSize().Width == style.Size.Width);
+ Assert.IsTrue(Window.Instance.GetWindowSize().Height == style.Size.Height);
+
+ Assert.IsTrue(0 == testingTarget.AnimationDataList[0].StartTime);
+ Assert.IsTrue(3000 == testingTarget.AnimationDataList[0].EndTime);
+ Assert.IsTrue("PositionX" == testingTarget.AnimationDataList[0].Property);
+ Assert.IsTrue(Window.Instance.GetWindowSize().Width.ToString() == testingTarget.AnimationDataList[0].DestinationValue);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionAnimationSlideOut END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData StartTime. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.StartTime A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataStartTimeGet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataStartTimeGet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+ var result = testingTarget.StartTime;
+ Assert.AreEqual(300, result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataStartTimeGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData StartTime. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.StartTime A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataStartTimeSet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataStartTimeSet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+
+ var result = testingTarget.StartTime;
+ Assert.AreEqual(300, result, "should be eaqual!");
+
+ testingTarget.StartTime = 600;
+ result = testingTarget.StartTime;
+ Assert.AreEqual(600, result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataStartTimeSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData EndTime. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.EndTime A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataEndTimeGet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataEndTimeGet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+
+ var result = testingTarget.EndTime;
+ Assert.AreEqual(600, result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataEndTimeGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData EndTime. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.EndTime A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataEndTimeSet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataEndTimeSet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+
+ var result = testingTarget.EndTime;
+ Assert.AreEqual(600, result, "should be eaqual!");
+
+ testingTarget.EndTime = 900;
+ result = testingTarget.EndTime;
+ Assert.AreEqual(900, result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataEndTimeSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData Property. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.Property A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataPropertyGet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataPropertyGet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+
+ var result = testingTarget.Property;
+ Assert.AreEqual("Size", result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataPropertyGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData Property. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.Property A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataPropertySet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataPropertySet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+
+ var result = testingTarget.Property;
+ Assert.AreEqual("Size", result, "should be eaqual!");
+
+ testingTarget.Property = "Position";
+ result = testingTarget.Property;
+ Assert.AreEqual("Position", result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataPropertySet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData DestinationValue. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.DestinationValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataDestinationValueGet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataDestinationValueGet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+
+ var result = testingTarget.DestinationValue;
+ Assert.AreEqual("100, 100", result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataDestinationValueGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionAnimationData DestinationValue. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionAnimations.TransitionAnimationData.DestinationValue A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionAnimationDataDestinationValueSet()
+ {
+ tlog.Debug(tag, $"TransitionAnimationDataDestinationValueSet START");
+
+ var testingTarget = new TransitionAnimationData()
+ {
+ StartTime = 300,
+ EndTime = 600,
+ Property = "Size",
+ DestinationValue = "100, 100",
+ };
+
+ var result = testingTarget.DestinationValue;
+ Assert.AreEqual("100, 100", result, "should be eaqual!");
+
+ testingTarget.Property = "Position";
+ testingTarget.DestinationValue = "0.3f, 0.9f, 0.0f";
+ result = testingTarget.DestinationValue;
+ Assert.AreEqual("0.3f, 0.9f, 0.0f", result, "should be eaqual!");
+
+ tlog.Debug(tag, $"TransitionAnimationDataDestinationValueSet END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/TransitionData")]
+ class PublicTransitionDataTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionData constructor. With PropertyMap")]
+ [Property("SPEC", "Tizen.NUI.TransitionData.TransitionData C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionDataConstructorWithPropertyMap()
+ {
+ tlog.Debug(tag, $"TransitionDataConstructorWithPropertyMap START");
+
+ var strAlpha = AlphaFunction.BuiltinFunctions.Default.GetDescription();
+ var animator = new PropertyMap();
+ using (PropertyValue myAlpha = new PropertyValue(strAlpha))
+ {
+ animator.Add("alphaFunction", myAlpha);
+ }
+ var transition = new PropertyMap();
+ using (PropertyValue myAnimator = new PropertyValue(animator))
+ {
+ transition.Add("animator", myAnimator);
+ }
+
+ var testingTarget = new TransitionData(transition);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionData>(testingTarget, "should be an instance of TransitionData class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionDataConstructorWithPropertyMap END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionData constructor. With PropertyArray")]
+ [Property("SPEC", "Tizen.NUI.TransitionData.TransitionData C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionDataConstructorWithPropertyArray()
+ {
+ tlog.Debug(tag, $"TransitionDataConstructorWithPropertyArray START");
+
+ var strAlpha = AlphaFunction.BuiltinFunctions.Default.GetDescription();
+ var animator = new PropertyMap();
+ using (PropertyValue myAlpha = new PropertyValue(strAlpha))
+ {
+ animator.Add("alphaFunction", myAlpha);
+ }
+ var transition = new PropertyMap();
+ using (PropertyValue myAnimator = new PropertyValue(animator))
+ {
+ transition.Add("animator", myAnimator);
+ }
+ var animateArray = new PropertyArray();
+ using (PropertyValue pvTransition = new PropertyValue(transition))
+ {
+ animateArray.Add(pvTransition);
+ }
+
+ var testingTarget = new TransitionData(animateArray);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionData>(testingTarget, "should be an instance of TransitionData class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionDataConstructorWithPropertyArray END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionData constructor. By copy constructor")]
+ [Property("SPEC", "Tizen.NUI.TransitionData.TransitionData C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionDataConstructorByCopyConstructor()
+ {
+ tlog.Debug(tag, $"TransitionDataConstructorByCopyConstructor START");
+
+ var strAlpha = AlphaFunction.BuiltinFunctions.Default.GetDescription();
+ var animator = new PropertyMap();
+ using (PropertyValue myAlpha = new PropertyValue(strAlpha))
+ {
+ animator.Add("alphaFunction", myAlpha);
+ }
+ var transition = new PropertyMap();
+ using (PropertyValue myAnimator = new PropertyValue(animator))
+ {
+ transition.Add("animator", myAnimator);
+ }
+ var animateArray = new PropertyArray();
+ using (PropertyValue pvTransition = new PropertyValue(transition))
+ {
+ animateArray.Add(pvTransition);
+ }
+
+ var dummy = new TransitionData(animateArray);
+ Assert.IsNotNull(dummy, "should be not null");
+ Assert.IsInstanceOf<TransitionData>(dummy, "should be an instance of TransitionData class!");
+
+ var testingTarget = new TransitionData(dummy);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionData>(testingTarget, "should be an instance of TransitionData class!");
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionDataConstructorByCopyConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionData Count")]
+ [Property("SPEC", "Tizen.NUI.TransitionData.Count M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionDataCount()
+ {
+ tlog.Debug(tag, $"TransitionDataCount START");
+
+ var strAlpha = AlphaFunction.BuiltinFunctions.Default.GetDescription();
+ var animator = new PropertyMap();
+ using (PropertyValue myAlpha = new PropertyValue(strAlpha))
+ {
+ animator.Add("alphaFunction", myAlpha);
+ }
+ var transition = new PropertyMap();
+ using (PropertyValue myAnimator = new PropertyValue(animator))
+ {
+ transition.Add("animator", myAnimator);
+ }
+ var animateArray = new PropertyArray();
+ using (PropertyValue pvTransition = new PropertyValue(transition))
+ {
+ animateArray.Add(pvTransition);
+ }
+
+ var testingTarget = new TransitionData(animateArray);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionData>(testingTarget, "should be an instance of TransitionData class!");
+
+ var result = testingTarget.Count();
+ Assert.AreEqual(1, result, "should be eaqual!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionDataCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionData GetAnimatorAt")]
+ [Property("SPEC", "Tizen.NUI.TransitionData.GetAnimatorAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionDataGetAnimatorAt()
+ {
+ tlog.Debug(tag, $"TransitionDataGetAnimatorAt START");
+
+ var strAlpha = AlphaFunction.BuiltinFunctions.Default.GetDescription();
+ var animator = new PropertyMap();
+ using (PropertyValue myAlpha = new PropertyValue(strAlpha))
+ {
+ animator.Add("alphaFunction", myAlpha);
+ }
+ var transition = new PropertyMap();
+ using (PropertyValue myAnimator = new PropertyValue(animator))
+ {
+ transition.Add("animator", myAnimator);
+ }
+ var animateArray = new PropertyArray();
+ using (PropertyValue pvTransition = new PropertyValue(transition))
+ {
+ animateArray.Add(pvTransition);
+ }
+
+ var testingTarget = new TransitionData(animateArray);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TransitionData>(testingTarget, "should be an instance of TransitionData class!");
+
+ var result = testingTarget.GetAnimatorAt(0);
+ Assert.AreEqual(3, result.Count(), "should be eaqual!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionDataGetAnimatorAt END (OK)");
+ }
+ }
+}
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Animation/TransitionOptions")]
+ public class PublicTransitionOptionsTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions constructor")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionOptions C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsConstructor()
+ {
+ tlog.Debug(tag, $"TransitionOptionsConstructor START");
+
+ var testingTarget = new TransitionOptions();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions constructor. With window instance")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionOptions C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsConstructorWithWindowInstance()
+ {
+ tlog.Debug(tag, $"TransitionOptionsConstructorWithWindowInstance START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsConstructorWithWindowInstance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions AnimatedTarget. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionOptions A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsAnimatedTargetGet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsAnimatedTargetGet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ View view = new View()
+ {
+ Size = new Size(30, 50)
+ };
+ testingTarget.AnimatedTarget = view;
+
+ var result = testingTarget.AnimatedTarget;
+ Assert.AreEqual(30, result.SizeWidth, "should be eaqual!");
+ Assert.AreEqual(50, result.SizeHeight, "should be eaqual!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsAnimatedTargetGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions AnimatedTarget. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionOptions A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsAnimatedTargetSet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsAnimatedTargetSet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ View view = new View()
+ {
+ Size = new Size(30, 50)
+ };
+ testingTarget.AnimatedTarget = view;
+
+ var result = testingTarget.AnimatedTarget;
+ Assert.AreEqual(30, result.SizeWidth, "should be eaqual!");
+ Assert.AreEqual(50, result.SizeHeight, "should be eaqual!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsAnimatedTargetSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions EnableTransition. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.EnableTransition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsEnableTransitionGet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsEnableTransitionGet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ var result = testingTarget.EnableTransition;
+ Assert.IsFalse(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsEnableTransitionGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions EnableTransition. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.EnableTransition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsEnableTransitionSet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsEnableTransitionSet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ testingTarget.EnableTransition = true;
+ Assert.IsTrue(testingTarget.EnableTransition);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsEnableTransitionSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions TransitionTag. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionTag A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsTransitionTagGet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsTransitionTagGet START");
+
+ View view = new View()
+ {
+ Size = new Size(50, 80),
+ TransitionOptions = new TransitionOptions()
+ };
+ view.TransitionOptions.TransitionTag = "default";
+ var result = view.TransitionOptions.TransitionTag;
+ Assert.AreEqual("default", result, "should be eaqual!");
+
+ view.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsTransitionTagGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions TransitionTag. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionTag A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsTransitionTagSet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsTransitionTagSet START");
+
+ View view = new View()
+ {
+ Size = new Size(50, 80),
+ TransitionOptions = new TransitionOptions()
+ };
+ view.TransitionOptions.TransitionTag = "default";
+ var result = view.TransitionOptions.TransitionTag;
+ Assert.AreEqual("default", result, "should be eaqual!");
+
+ view.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsTransitionTagSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions TransitionWithChild. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionWithChild A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsTransitionWithChildGet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsTransitionWithChildGet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ var result = testingTarget.TransitionWithChild;
+ Assert.IsFalse(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsTransitionWithChildGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions TransitionWithChild. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.TransitionWithChild A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsTransitionWithChildSet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsTransitionWithChildSet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ var result = testingTarget.TransitionWithChild;
+ Assert.IsFalse(result);
+
+ testingTarget.TransitionWithChild = true;
+ result = testingTarget.TransitionWithChild;
+ Assert.IsTrue(result);
+
+ tlog.Debug(tag, $"TransitionOptionsTransitionWithChildSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions ForwardAnimation. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.ForwardAnimation A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsForwardAnimationGet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsForwardAnimationGet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ View view = new View()
+ {
+ Size = new Size(150, 300),
+ Color = Color.Green
+ };
+ testingTarget.AnimatedTarget = view;
+ testingTarget.EnableTransition = true;
+
+ TransitionAnimation forwordAnimation = new TransitionAnimation(300);
+ testingTarget.ForwardAnimation = forwordAnimation;
+
+ var result = testingTarget.ForwardAnimation;
+ Assert.AreEqual(300 == result.DurationMilliSeconds, "should be eaqual!");
+
+ view.Dispose();
+ forwordAnimation.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsForwardAnimationGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions ForwardAnimation. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.ForwardAnimation A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsForwardAnimationSet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsForwardAnimationSet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ View view = new View()
+ {
+ Size = new Size(150, 300),
+ Color = Color.Green
+ };
+ testingTarget.AnimatedTarget = view;
+ testingTarget.EnableTransition = true;
+
+ TransitionAnimation forwordAnimation = new TransitionAnimation(300);
+ testingTarget.ForwardAnimation = forwordAnimation;
+
+ var result = testingTarget.ForwardAnimation;
+ Assert.AreEqual(300 == result.DurationMilliSeconds, "should be eaqual!");
+
+ view.Dispose();
+ forwordAnimation.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsForwardAnimationSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions BackwardAnimation. Get")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.BackwardAnimation A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsBackwardAnimationGet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsBackwardAnimationGet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ View view = new View()
+ {
+ Size = new Size(150, 300),
+ Color = Color.Green
+ };
+ testingTarget.AnimatedTarget = view;
+ testingTarget.EnableTransition = true;
+
+ TransitionAnimation backwordAnimation = new TransitionAnimation(300);
+ testingTarget.BackwardAnimation = backwordAnimation;
+
+ var result = testingTarget.BackwardAnimation;
+ Assert.AreEqual(300 == result.DurationMilliSeconds, "should be eaqual!");
+
+ view.Dispose();
+ backwordAnimation.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsBackwardAnimationGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions BackwardAnimation. Set")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.BackwardAnimation A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsBackwardAnimationSet()
+ {
+ tlog.Debug(tag, $"TransitionOptionsBackwardAnimationSet START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ View view = new View()
+ {
+ Size = new Size(150, 300),
+ Color = Color.Green
+ };
+ testingTarget.AnimatedTarget = view;
+ testingTarget.EnableTransition = true;
+
+ TransitionAnimation backwordAnimation = new TransitionAnimation(300);
+ testingTarget.BackwardAnimation = backwordAnimation;
+
+ var result = testingTarget.BackwardAnimation;
+ Assert.AreEqual(300 == result.DurationMilliSeconds, "should be eaqual!");
+
+ view.Dispose();
+ backwordAnimation.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TransitionOptionsBackwardAnimationSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TransitionOptions Dispose")]
+ [Property("SPEC", "Tizen.NUI.TransitionOptions.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TransitionOptionsDispose()
+ {
+ tlog.Debug(tag, $"TransitionOptionsDispose START");
+
+ var testingTarget = new TransitionOptions(Window.Instance);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<TransitionOptions>(testingTarget, "should be an instance of TransitionOptions class!");
+
+ try
+ {
+ testingTarget.Dispose();
+ }
+ catch (Exception e)
+ {
+ tlog.Error(tag, "Caught Exception" + e.ToString());
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"TransitionOptionsDispose END (OK)");
+ }
+ }
+}