--- /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/Common/Extents")]
+ class PublicExtensionsTest
+ {
+ 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("Extents constructor")]
+ [Property("SPEC", "Tizen.NUI.Extents.Extents C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsConstructor()
+ {
+ tlog.Debug(tag, $"ExtentsConstructor START");
+
+ var testingTarget = new Extents();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents constructor. With four UInt16 parameters")]
+ [Property("SPEC", "Tizen.NUI.Extents.Extents C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsConstructorWithUInt16Parameters()
+ {
+ tlog.Debug(tag, $"ExtentsConstructorWithUInt16Parameters START");
+
+ var testingTarget = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(1, testingTarget.Start, "Retrieved extents.Start should be equal to 1");
+ Assert.AreEqual(2, testingTarget.End, "Retrieved extents.End should be equal to 2");
+ Assert.AreEqual(3, testingTarget.Top, "Retrieved extents.Top should be equal to 3");
+ Assert.AreEqual(4, testingTarget.Bottom, "Retrieved extents.Bottom should be equal 4");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsConstructorWithUInt16Parameters END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents constructor Extents instance")]
+ [Property("SPEC", "Tizen.NUI.Extents.Extents C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsConstructorWithExtents()
+ {
+ tlog.Debug(tag, $"ExtentsConstructorWithExtents START");
+
+ var testingTarget = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+
+ var result = new Extents(testingTarget);
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsInstanceOf<Extents>(result, "should be an instance of Extents class!");
+
+ Assert.AreEqual(1, result.Start, "Retrieved extents.Start should be equal to 1");
+ Assert.AreEqual(2, result.End, "Retrieved extents.End should be equal to 2");
+ Assert.AreEqual(3, result.Top, "Retrieved extents.Top should be equal to 3");
+ Assert.AreEqual(4, result.Bottom, "Retrieved extents.Bottom should be equal to 4");
+
+ result.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsConstructorWithExtents END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents EqualTo")]
+ [Property("SPEC", "Tizen.NUI.Extents.EqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsEqualTo()
+ {
+ tlog.Debug(tag, $"ExtentsEqualTo START");
+
+ Extents testingTarget = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget;
+ Assert.IsNotNull(result, "should be not null");
+ Assert.IsInstanceOf<Extents>(result, "should be an instance of Extents class!");
+
+ Assert.IsTrue((testingTarget.EqualTo(result)), "Should be equal");
+
+ result.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsEqualTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents NotEqualTo")]
+ [Property("SPEC", "Tizen.NUI.Extents.NotEqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsNotEqualTo()
+ {
+ tlog.Debug(tag, $"ExtentsNotEqualTo START");
+
+ Extents testingTarget1 = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget1, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget1, "should be an instance of Extents class!");
+
+ Extents testingTarget2 = new Extents(2, 3, 4, 5);
+ Assert.IsNotNull(testingTarget2, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget2, "should be an instance of Extents class!");
+
+ Assert.IsTrue((testingTarget1.NotEqualTo(testingTarget2)), "Should be not equal");
+
+ testingTarget2.Dispose();
+ testingTarget1.Dispose();
+ tlog.Debug(tag, $"ExtentsNotEqualTo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents Start")]
+ [Property("SPEC", "Tizen.NUI.Extents.Start A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsStart()
+ {
+ tlog.Debug(tag, $"ExtentsStart START");
+
+ var testingTarget = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+ Assert.AreEqual(1, testingTarget.Start, "testingTarget.Start should be equal to the set value!");
+
+ testingTarget.Start = 5;
+ Assert.AreEqual(5, testingTarget.Start, "testingTarget.Start should be equal to the set value!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsStart END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents End")]
+ [Property("SPEC", "Tizen.NUI.Extents.End A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsEnd()
+ {
+ tlog.Debug(tag, $"ExtentsEnd START");
+
+ var testingTarget = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+ Assert.AreEqual(2, testingTarget.End, "extents.End should be equal to 2!");
+
+ testingTarget.End = 5;
+ Assert.AreEqual(5, testingTarget.End, "extents.End should be equal to 5!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsEnd END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents Top")]
+ [Property("SPEC", "Tizen.NUI.Extents.Top A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsTop()
+ {
+ tlog.Debug(tag, $"ExtentsTop START");
+
+ Extents testingTarget = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+ Assert.AreEqual(3, testingTarget.Top, "extents.Top should be equal to 3!");
+
+ testingTarget.Top = 5;
+ Assert.AreEqual(5, testingTarget.Top, "extents.Top should be equal to 5!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsTop END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Extents Bottom")]
+ [Property("SPEC", "Tizen.NUI.Extents.Bottom A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void ExtentsBottom()
+ {
+ tlog.Debug(tag, $"ExtentsBottom START");
+
+ Extents testingTarget = new Extents(1, 2, 3, 4);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<Extents>(testingTarget, "should be an instance of testing target class!");
+ Assert.AreEqual(4, testingTarget.Bottom, "extents.Bottom should be equal to 4!");
+
+ testingTarget.Bottom = 5;
+ Assert.AreEqual(5, testingTarget.Bottom, "extents.Bottom should be equal to 4!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"ExtentsBottom 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/Common/Property")]
+ class PublicPropertyTest
+ {
+ 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("Property constructor")]
+ [Property("SPEC", "Tizen.NUI.Property.Property C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConstructor()
+ {
+ tlog.Debug(tag, $"PropertyConstructor START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var dummyIndex = 28000000;
+ var testingTarget = new Property(animatable, dummyIndex);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Property constructor. With sub component index")]
+ [Property("SPEC", "Tizen.NUI.Property.Property C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConstructorWithSubComponentIndex()
+ {
+ tlog.Debug(tag, $"PropertyConstructorWithSubComponentIndex START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var dummyIndex = 28000000;
+ var testingTarget = new Property(animatable, dummyIndex, -1);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyConstructorWithSubComponentIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Property constructor. With property name")]
+ [Property("SPEC", "Tizen.NUI.Property.Property C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConstructorWithPropertyName()
+ {
+ tlog.Debug(tag, $"PropertyConstructorWithPropertyName START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var testingTarget = new Property(animatable, "image");
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyConstructorWithPropertyName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Property constructor. With property name and sub component index")]
+ [Property("SPEC", "Tizen.NUI.Property.Property C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConstructorWithPropertyNameSubComponentIndex()
+ {
+ tlog.Debug(tag, $"PropertyConstructorWithPropertyNameSubComponentIndex START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var testingTarget = new Property(animatable, "image", -1);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyConstructorWithPropertyNameSubComponentIndex END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Property propertyIndex. Get")]
+ [Property("SPEC", "Tizen.NUI.Property.propertyIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyPropertyIndexGet()
+ {
+ tlog.Debug(tag, $"PropertyPropertyIndexGet START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var testingTarget = new Property(animatable, 28000000);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ var result = testingTarget.propertyIndex;
+ Assert.IsTrue(28000000 == result);
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyPropertyIndexGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Property propertyIndex. Set")]
+ [Property("SPEC", "Tizen.NUI.Property.propertyIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyPropertyIndexSet()
+ {
+ tlog.Debug(tag, $"PropertyPropertyIndexSet START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var testingTarget = new Property(animatable, 28000000);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.propertyIndex = 29000000;
+ var result = testingTarget.propertyIndex;
+ Assert.IsTrue(29000000 == result);
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyPropertyIndexSet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Property componentIndex. Get")]
+ [Property("SPEC", "Tizen.NUI.Property.componentIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyComponentIndexGet()
+ {
+ tlog.Debug(tag, $"PropertyPropertyIndexGet START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var testingTarget = new Property(animatable, 28000000, -1);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ var result = testingTarget.componentIndex;
+ Assert.IsTrue(-1 == result);
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyPropertyIndexGet END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Property componentIndex. Get")]
+ [Property("SPEC", "Tizen.NUI.Property.componentIndex A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyComponentIndexIndexSet()
+ {
+ tlog.Debug(tag, $"PropertyPropertyIndexSet START");
+
+ var animatable = new Animatable();
+ Assert.IsNotNull(animatable, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(animatable, "Should return PropertyValue instance.");
+
+ var testingTarget = new Property(animatable, 28000000, -1);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<Property>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.componentIndex = 30000000;
+ var result = testingTarget.componentIndex;
+ Assert.IsTrue(30000000 == result);
+
+ testingTarget.Dispose();
+ animatable.Dispose();
+ tlog.Debug(tag, $"PropertyPropertyIndexSet 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/Common/PropertyArray")]
+ class TSPropertyArray
+ {
+ 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("PropertyArray constructor")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.PropertyArray C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayConstructor()
+ {
+ tlog.Debug(tag, $"PropertyArrayConstructor START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Size")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Size M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArraySize()
+ {
+ tlog.Debug(tag, $"PropertyArraySize START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Reserve(3);
+ Assert.IsTrue(testingTarget.Size() == 0, "testingTarget's size should be 1");
+ var pValue = new PropertyValue(1);
+ testingTarget.PushBack(pValue);
+ Assert.IsTrue(testingTarget.Size() == 1, "testingTarget's size should be 1");
+
+ pValue.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArraySize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Count")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Count M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayCount()
+ {
+ tlog.Debug(tag, $"PropertyArrayCount START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+ Assert.AreEqual(0, testingTarget.Count(), "Retrieved testingTarget.Count() should be equal to 0.");
+
+ testingTarget.Reserve(3);
+ var pValue = new PropertyValue(1);
+ testingTarget.PushBack(pValue);
+ Assert.IsTrue(testingTarget.Count() == 1, "testingTarget's count should be 1");
+
+ pValue.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Empty")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", " MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayEmpty()
+ {
+ tlog.Debug(tag, $"PropertyArrayEmpty START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Reserve(3);
+ Assert.IsTrue(testingTarget.Empty());
+
+ var pVal = new PropertyValue(1);
+ testingTarget.PushBack(pVal);
+ Assert.IsFalse(testingTarget.Empty());
+
+ pVal.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Clear")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayClear()
+ {
+ tlog.Debug(tag, $"PropertyArrayClear START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Reserve(3);
+ var pValue = new PropertyValue(1);
+ testingTarget.PushBack(pValue);
+ Assert.IsFalse(testingTarget.Empty());
+
+ testingTarget.Clear();
+ Assert.IsTrue(testingTarget.Empty());
+
+ pValue.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayClear END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Reserve")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Reserve M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayReserve()
+ {
+ tlog.Debug(tag, $"PropertyArrayReserve START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+ Assert.IsTrue(testingTarget.Capacity() == 0, "testingTarget's capacity should be 0");
+
+ testingTarget.Reserve(3);
+ Assert.IsTrue(testingTarget.Capacity() == 3, "testingTarget's capacity should be 3");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayClear END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Resize")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Resize M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayResize()
+ {
+ tlog.Debug(tag, $"PropertyArrayResize START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Resize(5);
+ var result = testingTarget.Count();
+ Assert.IsTrue(result == 5, "result should be 5");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayResize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Capacity")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Capacity M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayCapacity()
+ {
+ tlog.Debug(tag, $"PropertyArrayCapacity START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Reserve(6);
+ var result = testingTarget.Capacity();
+ Assert.IsTrue(result == 6, "result should be 6");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayCapacity END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray PushBack")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.PushBack M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayPushBack()
+ {
+ tlog.Debug(tag, $"PropertyArrayPushBack START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ var pValue = new PropertyValue(4);
+ testingTarget.PushBack(pValue);
+ var result = testingTarget.Size();
+ Assert.IsTrue(result == 1, "result should be 1");
+
+ pValue.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayPushBack END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Add. Add with property value")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayAddWithProperty()
+ {
+ tlog.Debug(tag, $"PropertyArrayAddWithProperty START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ var pValue = new PropertyValue(14.0f);
+ testingTarget.Add(pValue);
+ Assert.AreEqual(1, testingTarget.Size(), "Retrieved testingTarget.Size() should be equal to 1.");
+
+ var result = 0.0f;
+ testingTarget[0].Get(out result);
+ Assert.IsTrue(result == 14.0f, "result should be 14.0f");
+
+ pValue.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayAddWithProperty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray Add. Add with key value")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayAddWithKey()
+ {
+ tlog.Debug(tag, $"PropertyArrayAddWithKey START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ var kValue = new KeyValue();
+ kValue.SingleValue = 14.0f;
+ testingTarget.Add(kValue);
+ Assert.AreEqual(1, testingTarget.Size(), "Retrieved testingTarget.Size() should be equal to 1.");
+
+ var result = 0.0f;
+ testingTarget[0].Get(out result);
+ Assert.IsTrue(result == 14.0f, "result should be 14.0f");
+
+ kValue.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayAddWithKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyArray GetElementAt")]
+ [Property("SPEC", "Tizen.NUI.PropertyArray.GetElementAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyArrayGetElementAt()
+ {
+ tlog.Debug(tag, $"PropertyArrayGetElementAt START");
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "should be an instance of testing target class!");
+
+ var pValue = new PropertyValue(3.0f);
+ testingTarget.Add(pValue);
+
+ var result = 0.0f;
+ testingTarget.GetElementAt(0).Get(out result);
+ Assert.IsTrue(result == 3.0f, "result should be 3.0f");
+
+ pValue.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyArrayGetElementAt 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/Common/PropertyBuffer")]
+ class PublicPropertyBufferTest
+ {
+ 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("PropertyBuffer constructor")]
+ [Property("SPEC", "Tizen.NUI.PropertyBuffer.PropertyBuffer C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyBufferConstructor()
+ {
+ tlog.Debug(tag, $"PropertyBufferConstructor START");
+
+ PropertyMap buffer = new PropertyMap();
+ Assert.IsNotNull(buffer, "should be not null");
+ Assert.IsInstanceOf<PropertyMap>(buffer, "should be an instance of PropertyMap class!");
+ buffer.Add("aIndex", new PropertyValue((int)PropertyType.Float));
+ buffer.Add("aValue", new PropertyValue((int)PropertyType.Float));
+
+ var testingTarget = new PropertyBuffer(buffer);
+ Assert.IsNotNull(testingTarget, "Can't create success object PropertyBuffer");
+ Assert.IsInstanceOf<PropertyBuffer>(testingTarget, "Should be an instance of PropertyBuffer class!");
+
+ testingTarget.Dispose();
+ buffer.Dispose();
+ tlog.Debug(tag, $"PropertyBufferConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyBuffer GetSize")]
+ [Property("SPEC", "Tizen.NUI.PropertyBuffer.GetSize M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyBufferGetSize()
+ {
+ tlog.Debug(tag, $"PropertyBufferGetSize START");
+
+ PropertyMap buffer = new PropertyMap();
+ Assert.IsNotNull(buffer, "should be not null");
+ Assert.IsInstanceOf<PropertyMap>(buffer, "should be an instance of PropertyMap class!");
+ buffer.Add("aIndex", new PropertyValue((int)PropertyType.Float));
+ buffer.Add("aValue", new PropertyValue((int)PropertyType.Float));
+
+ var testingTarget = new PropertyBuffer(buffer);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyBuffer>(testingTarget, "Should be an instance of PropertyBuffer class!");
+ Assert.AreEqual(0, testingTarget.GetSize(), "Should be Equal.");
+
+ testingTarget.Dispose();
+ buffer.Dispose();
+ tlog.Debug(tag, $"PropertyBufferGetSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyBuffer SetData")]
+ [Property("SPEC", "Tizen.NUI.PropertyBuffer.SetData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyBufferSetData()
+ {
+ tlog.Debug(tag, $"PropertyBufferSetData START");
+
+ PropertyMap buffer = new PropertyMap();
+ Assert.IsNotNull(buffer, "should be not null");
+ Assert.IsInstanceOf<PropertyMap>(buffer, "should be an instance of PropertyMap class!");
+ buffer.Add("aIndex", new PropertyValue((int)PropertyType.Float));
+ buffer.Add("aValue", new PropertyValue((int)PropertyType.Float));
+
+ var testingTarget = new PropertyBuffer(buffer);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyBuffer>(testingTarget, "Should be an instance of PropertyBuffer class!");
+ try
+ {
+ global::System.IntPtr data = new global::System.IntPtr();
+ testingTarget.SetData(data, 0);
+ }
+ catch (Exception e)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+ Assert.AreEqual(0, testingTarget.GetSize(), "Should be Equal.");
+
+ testingTarget.Dispose();
+ buffer.Dispose();
+ tlog.Debug(tag, $"PropertyBufferSetData 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/Common/PropertyCondition")]
+ class PublicPropertyConditionTest
+ {
+ 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("PropertyCondition constructor")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.PropertyCondition C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionConstructor()
+ {
+ tlog.Debug(tag, $"PropertyConditionConstructor START");
+
+ var testingTarget = new Tizen.NUI.PropertyCondition();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition GetArgumentCount")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.GetArgumentCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionGetArgumentCount()
+ {
+ tlog.Debug(tag, $"PropertyConditionGetArgumentCount START");
+
+ var testingTarget = PropertyCondition.LessThan(100);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(1, testingTarget.GetArgumentCount(), $"Should be 1");
+ Assert.AreEqual(100, testingTarget.GetArgument(0), $"Should be 100");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionGetArgumentCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition GetArgument")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.GetArgument M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionGetArgument()
+ {
+ tlog.Debug(tag, $"PropertyConditionGetArgument START");
+
+ var testingTarget = PropertyCondition.GreaterThan(100);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(1, testingTarget.GetArgumentCount(), $"Should be 1");
+ Assert.AreEqual(100, testingTarget.GetArgument(0), $"Should be 100");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionGetArgument END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition LessThan")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.LessThan M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionLessThan()
+ {
+ tlog.Debug(tag, $"PropertyConditionLessThan START");
+
+ var testingTarget = PropertyCondition.LessThan(50);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(1, testingTarget.GetArgumentCount(), $"Should be 1");
+ Assert.AreEqual(50, testingTarget.GetArgument(0), $"Should be 50");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionLessThan END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition GreaterThan")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.GreaterThan M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionGreaterThan()
+ {
+ tlog.Debug(tag, $"PropertyConditionGreaterThan START");
+
+ var testingTarget = PropertyCondition.GreaterThan(50);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(1, testingTarget.GetArgumentCount(), $"Should be 1");
+ Assert.AreEqual(50, testingTarget.GetArgument(0), $"Should be 50");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionGreaterThan END (OK)");
+ }
+
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition Inside")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.Inside M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionInside()
+ {
+ tlog.Debug(tag, $"PropertyConditionInside START");
+
+ var testingTarget = PropertyCondition.Inside(50, 100);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionInside END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition Outside")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.Outside M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionOutside()
+ {
+ tlog.Debug(tag, $"PropertyConditionOutside START");
+
+ var testingTarget = PropertyCondition.Outside(50, 100);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(2, testingTarget.GetArgumentCount(), $"Should be 2");
+ Assert.AreEqual(50, testingTarget.GetArgument(0), $"Should be 50");
+ Assert.AreEqual(100, testingTarget.GetArgument(1), $"Should be 100");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionOutside END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition Step")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.Step M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionStep()
+ {
+ tlog.Debug(tag, $"PropertyConditionStep START");
+
+ var testingTarget = PropertyCondition.Step(50);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(3, testingTarget.GetArgumentCount(), $"Should be 3");
+ Assert.AreEqual(0, testingTarget.GetArgument(0), $"Should be 0");
+ Assert.AreEqual(0.02f, testingTarget.GetArgument(1), $"Should be 0.02");
+ Assert.AreEqual(0, testingTarget.GetArgument(2), $"Should be 0");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionStep END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition Step. With two strings parameters")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.Step M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionStepWithTwoStringParameters()
+ {
+ tlog.Debug(tag, $"PropertyConditionStepWithTwoStringParameters START");
+
+ var testingTarget = PropertyCondition.Step(50, 100);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.AreEqual(3, testingTarget.GetArgumentCount(), $"Should be 3");
+ Assert.AreEqual(100, testingTarget.GetArgument(0), $"Should be 100");
+ Assert.AreEqual(0.02f, testingTarget.GetArgument(1), $"Should be 0.02");
+ Assert.AreEqual(0, testingTarget.GetArgument(2), $"Should be 0");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyConditionStepWithTwoStringParameters END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyCondition Dispose")]
+ [Property("SPEC", "Tizen.NUI.PropertyCondition.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyConditionDispose()
+ {
+ tlog.Debug(tag, $"PropertyConditionDispose START");
+
+ PropertyCondition testingTarget = new PropertyCondition();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyCondition>(testingTarget, "should be an instance of testing target class!");
+ try
+ {
+ testingTarget.Dispose();
+ }
+ catch (Exception e)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"PropertyConditionDispose 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/Common/PropertyKey")]
+ class PublicPropertyKeyTest
+ {
+ 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("PropertyKey constructor. With string")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.PropertyKey C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyConstructorWithString()
+ {
+ tlog.Debug(tag, $"PropertyKeyConstructorWithString START");
+
+ var testingTarget = new PropertyKey("dali");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyConstructorWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey constructor. With int")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.PropertyKey C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyConstructorWithInt()
+ {
+ tlog.Debug(tag, $"PropertyKeyConstructorWithInt START");
+
+ var testingTarget = new PropertyKey(7);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyConstructorWithInt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey Type. String key")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.Type A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW PRE")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyType()
+ {
+ tlog.Debug(tag, $"PropertyKeyType START");
+
+ var testingTarget = new PropertyKey("hello world");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+ Assert.IsTrue(PropertyKey.KeyType.String == testingTarget.Type);
+
+ testingTarget.Type = PropertyKey.KeyType.Index;
+ Assert.IsTrue(PropertyKey.KeyType.Index == testingTarget.Type);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey Type. Int key")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.Type A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyTypeWithInt()
+ {
+ tlog.Debug(tag, $"PropertyKeyTypeWithInt START");
+
+ var testingTarget = new PropertyKey(1);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+ Assert.IsTrue(PropertyKey.KeyType.Index == testingTarget.Type);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyTypeWithInt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey IndexKey")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.IndexKey A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyIndexKey()
+ {
+ tlog.Debug(tag, $"PropertyKeyIndexKey START");
+
+ var testingTarget = new PropertyKey(30);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+ Assert.IsTrue(30 == testingTarget.IndexKey);
+
+ testingTarget.IndexKey = 20;
+ Assert.IsTrue(20 == testingTarget.IndexKey);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyIndexKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey StringKey")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.StringKey A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyStringKey()
+ {
+ tlog.Debug(tag, $"PropertyKeyStringKey START");
+
+ var testingTarget = new PropertyKey("aKey");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+ Assert.IsTrue("aKey" == testingTarget.StringKey);
+
+ testingTarget.StringKey = "bKey";
+ Assert.IsTrue("bKey" == testingTarget.StringKey);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyStringKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey EqualTo. With String")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.EqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyEqualToWithString()
+ {
+ tlog.Debug(tag, $"PropertyKeyEqualToWithString START");
+
+ var testingTarget = new PropertyKey("hello world");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+
+ Assert.IsTrue(testingTarget.EqualTo("hello world"));
+ testingTarget.Dispose();
+
+ tlog.Debug(tag, $"PropertyKeyEqualToWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey EqualTo. With Int")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.EqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyEqualToWithInt()
+ {
+ tlog.Debug(tag, $"PropertyKeyEqualToWithInt START");
+
+ var testingTarget = new PropertyKey(20);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.EqualTo(20);
+ Assert.IsNotNull(result, "The result should not be null");
+ Assert.IsTrue(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyEqualToWithInt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey EqualTo. With PropertyKey")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.EqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyEqualToWithPropertyKey()
+ {
+ tlog.Debug(tag, $"PropertyKeyEqualToWithPropertyKey START");
+
+ var pkey1 = new PropertyKey(20);
+ Assert.IsNotNull(pkey1, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(pkey1, "should be an instance of PropertyKey class!");
+
+ var pkey2 = pkey1;
+ var result = pkey1.EqualTo(pkey2);
+ Assert.IsNotNull(result, "The result should not be null");
+ Assert.IsTrue(result);
+
+ pkey2.Dispose();
+ pkey1.Dispose();
+ tlog.Debug(tag, $"PropertyKeyEqualToWithPropertyKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey NotEqualTo. With String")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.NotEqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyNotEqualToWithString()
+ {
+ tlog.Debug(tag, $"PropertyKeyNotEqualToWithString START");
+
+ var testingTarget = new PropertyKey("DALI");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.NotEqualTo("HELLO");
+ Assert.IsNotNull(result, "The result should not be null");
+ Assert.IsTrue(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyNotEqualToWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey NotEqualTo. With Int")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.NotEqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyNotEqualToWithInt()
+ {
+ tlog.Debug(tag, $"PropertyKeyNotEqualToWithInt START");
+
+ var testingTarget = new PropertyKey(20);
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(testingTarget, "should be an instance of testing target class!");
+
+ var result = testingTarget.NotEqualTo(30);
+ Assert.IsNotNull(result, "The result should not be null");
+ Assert.IsTrue(result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyKeyNotEqualToWithInt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyKey NotEqualTo. With PropertyKey")]
+ [Property("SPEC", "Tizen.NUI.PropertyKey.NotEqualTo M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyKeyNotEqualToWithPropertyKey()
+ {
+ tlog.Debug(tag, $"PropertyKeyNotEqualToWithPropertyKey START");
+
+ var pKey1 = new PropertyKey(20);
+ Assert.IsNotNull(pKey1, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(pKey1, "should be an instance of PropertyKey class!");
+
+ var pKey2 = new PropertyKey(30);
+ Assert.IsNotNull(pKey2, "should be not null");
+ Assert.IsInstanceOf<PropertyKey>(pKey2, "should be an instance of PropertyKey class!");
+
+ var result = pKey1.NotEqualTo(pKey2);
+ Assert.IsNotNull(result, "The result should not be null");
+ Assert.IsTrue(result);
+
+ pKey2.Dispose();
+ pKey1.Dispose();
+ tlog.Debug(tag, $"PropertyKeyNotEqualToWithPropertyKey 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/Common/PropertyMap")]
+ class PublicPropertyMapTest
+ {
+ 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("PropertyMap constructor")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.PropertyMap C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapConstructor()
+ {
+ tlog.Debug(tag, $"PropertyMapConstructor START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap constructor. With PropertyMap parameter")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.PropertyMap C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "PropertyMap")]
+ public void PropertyMapConstructorWithPropertyMap()
+ {
+ tlog.Debug(tag, $"PropertyMapConstructorWithPropertyMap START");
+
+ var dummy = new PropertyMap();
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(dummy, "should be an instance of PropertyMap class!");
+
+ var testingTarget = new PropertyMap(dummy);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ testingTarget.Dispose();
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyMapConstructorWithPropertyMap END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Insert. Insert key with string")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.this[string] A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "string")]
+ public void PropertyMapInsertKeyWithString()
+ {
+ tlog.Debug(tag, $"PropertyMapInsertKeyWithString START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new PropertyValue(14.0f);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Insert("A", dummy);
+ PropertyValue value = testingTarget["A"];
+ float result = 0;
+ value.Get(out result);
+ Assert.IsTrue(result == 14);
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapInsertKeyWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Insert. Insert key with int")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.this[int] A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "int")]
+ public void PropertyMapInsertKeyWithInt()
+ {
+ tlog.Debug(tag, $"PropertyMapInsertKeyWithInt START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new PropertyValue(14.0f);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Insert(8, dummy);
+ PropertyValue value = testingTarget[8];
+ float result = 0;
+ value.Get(out result);
+ Assert.IsTrue(result == 14);
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapInsertKeyWithInt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Count")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Count M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapCount()
+ {
+ tlog.Debug(tag, $"PropertyMapCount START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy1 = new PropertyValue(4.0f);
+ Assert.IsNotNull(dummy1, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy1, "should be an instance of PropertyValue class!");
+
+ testingTarget.Insert(8, dummy1);
+
+ var dummy2 = new PropertyValue(5.0f);
+ Assert.IsNotNull(dummy2, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy2, "should be an instance of PropertyValue class!");
+
+ testingTarget.Insert(18, dummy2);
+ Assert.AreEqual(2, testingTarget.Count(), "Retrive testingTarget.Count() should equal to 2.");
+
+ dummy1.Dispose();
+ dummy2.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Empty")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapEmpty()
+ {
+ tlog.Debug(tag, $"PropertyMapEmpty START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ Assert.True(testingTarget.Empty(), "the testingTarget is empty");
+
+ var dummy1 = new PropertyValue(4.0f);
+ Assert.IsNotNull(dummy1, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy1, "should be an instance of PropertyValue class!");
+
+ testingTarget.Insert(8, dummy1);
+
+ var dummy2 = new PropertyValue(5.0f);
+ Assert.IsNotNull(dummy2, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy2, "should be an instance of PropertyValue class!");
+
+ testingTarget.Insert(18, dummy2);
+
+ Assert.False(testingTarget.Empty(), "the PropertyMap is not empty");
+
+ dummy1.Dispose();
+ dummy2.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Add. Add key with string")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "string, PropertyValue")]
+ public void PropertyMapAddKeyWithString()
+ {
+ tlog.Debug(tag, $"PropertyMapAddKeyWithString START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ PropertyValue dummy = new PropertyValue(4.0f);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Add("hello", dummy);
+ Assert.AreEqual(1, testingTarget.Count(), "Retrive testingTarget.Count() should equal to 1.");
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapAddKeyWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Add. Add key with int")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "int, PropertyValue")]
+ public void PropertyMapAddKeyWithInt()
+ {
+ tlog.Debug(tag, $"PropertyMapAddKeyWithInt START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ PropertyValue dummy = new PropertyValue(4.0f);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Add(300, dummy);
+ Assert.AreEqual(1, testingTarget.Count(), "Retrive testingTarget.Count() should equal to 1.");
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapAddKeyWithInt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Add. Add with KeyValue")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Add M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "KeyValue")]
+ [Obsolete]
+ public void PropertyMapAddWithKeyValue()
+ {
+ tlog.Debug(tag, $"PropertyMapAddWithKeyValue START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new KeyValue();
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<KeyValue>(dummy, "should be an instance of KeyValue class!");
+
+ dummy.KeyInt = 300;
+ dummy.SingleValue = 4.0f;
+ testingTarget.Add(dummy);
+
+ Assert.AreEqual(1, testingTarget.Count(), "Add with string and PropertyValue parameter function does not work");
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapAddWithKeyValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap GetValue")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.GetValue M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapGetValue()
+ {
+ tlog.Debug(tag, $"PropertyMapGetValue START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new PropertyValue(4.0f);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Insert("hello", dummy);
+ var result = testingTarget.GetValue(0);
+ Assert.IsInstanceOf<PropertyValue>(result, "Should return PropertyValue instance.");
+
+ result.Dispose();
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapGetValue END (OK)");
+ }
+
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap GetKeyAt")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.GetKeyAt M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapGetKeyAt()
+ {
+ tlog.Debug(tag, $"PropertyMapGetKeyAt START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new PropertyValue(4.0f);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Add("hello", dummy);
+ var key = testingTarget.GetKeyAt(0);
+ Assert.AreEqual(PropertyKey.KeyType.String, key.Type, "Retrive key.Type should equal to PropertyKey.KeyType.String");
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapGetKeyAt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Find. Find with int key")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Find M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "int")]
+ public void PropertyMapFindWithIntKey()
+ {
+ tlog.Debug(tag, $"PropertyMapFindWithIntKey START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new PropertyValue(400.0f);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Add(2, dummy);
+ PropertyValue value = testingTarget.Find(2);
+ float result = 0;
+ value.Get(out result);
+ Assert.AreEqual(400.0f, result, "Retrive result should equal to the set value.");
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapFindWithIntKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Find. Find with int key and string Key")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Find M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ [Property("COVPARAM", "int, string")]
+ public void PropertyMapFindWithIntAndStringKey()
+ {
+ tlog.Debug(tag, $"PropertyMapFindWithIntAndStringKey START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new PropertyValue("DALI");
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Add("A", dummy);
+ PropertyValue value = testingTarget.Find(10, "A");
+ string result = "";
+ value.Get(out result);
+ Assert.AreEqual("DALI", result, "Retrive result should equal to the set value.");
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapFindWithIntAndStringKey END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Clear")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapClear()
+ {
+ tlog.Debug(tag, $"PropertyMapClear START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummy = new PropertyValue(5);
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an instance of PropertyValue class!");
+
+ testingTarget.Add(100, dummy);
+ testingTarget.Clear();
+ Assert.AreEqual(0, testingTarget.Count(), "Retrive testingTarget.Count() should equal to 0.");
+
+ dummy.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapClear END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Merge")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Merge M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapMerge()
+ {
+ tlog.Debug(tag, $"PropertyMapMerge START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap class!");
+
+ var dummyValue1 = new PropertyValue(5);
+ Assert.IsNotNull(dummyValue1, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummyValue1, "should be an instance of PropertyValue class!");
+ testingTarget.Add(100, dummyValue1);
+
+ var dummy = new PropertyMap();
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(dummy, "should be an instance of PropertyMap class!");
+
+ var dummyValue2 = new PropertyValue(6);
+ Assert.IsNotNull(dummyValue2, "should not be null.");
+ Assert.IsInstanceOf<PropertyValue>(dummyValue2, "should be an instance of PropertyValue class!");
+ dummy.Add("A", dummyValue2);
+
+ testingTarget.Merge(dummy);
+ Assert.AreEqual(2, testingTarget.Count(), "Retrive dummy1.Count() should equal to 2.");
+
+ dummyValue2.Dispose();
+ dummy.Dispose();
+ dummyValue1.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyMapMerge END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyMap Dispose")]
+ [Property("SPEC", "Tizen.NUI.PropertyMap.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyMapDispose()
+ {
+ tlog.Debug(tag, $"PropertyMapDispose START");
+
+ var testingTarget = new PropertyMap();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyMap>(testingTarget, "should be an instance of PropertyMap 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, $"PropertyMapDispose 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 tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Common/PropertyNotification")]
+ class PublicPropertyNotificationTest
+ {
+ 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("PropertyNotification constructor")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.PropertyNotification C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationConstructor()
+ {
+ tlog.Debug(tag, $"PropertyNotificationConstructor START");
+
+ var testintTarget = new Tizen.NUI.PropertyNotification();
+ Assert.IsNotNull(testintTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testintTarget, "should be an instance of PropertyNotification class!");
+
+ testintTarget.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification constructor. With PropertyNotification instance")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.PropertyNotification C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("COVPARAM", "PropertyNotification")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationConstructorWithPropertyNotification()
+ {
+ tlog.Debug(tag, $"PropertyNotificationConstructorWithPropertyNotification START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+
+ var dummy = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(dummy, "should be an instance of PropertyNotification class!");
+
+ var testingTarget = new Tizen.NUI.PropertyNotification(dummy);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ testingTarget.Dispose();
+ dummy.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationConstructorWithPropertyNotification END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification GetTarget")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.GetTarget M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationGetTarget()
+ {
+ tlog.Debug(tag, $"PropertyNotificationGetTarget START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+
+ var testingTarget = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ var result = testingTarget.GetTarget();
+ Assert.IsNotNull(result, "Should be not null!");
+ Assert.IsInstanceOf<Animatable>(result, "should be an instance of Animatable class!");
+
+ result.Dispose();
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationGetTarget END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification GetCondition")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.GetCondition M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationGetCondition()
+ {
+ tlog.Debug(tag, $"PropertyNotificationGetCondition START");
+
+ var dummyView = new View();
+ Assert.IsNotNull(dummyView, "should not be null.");
+ Assert.IsInstanceOf<View>(dummyView, "should be an instance of View class!");
+
+ var dummycondition = PropertyCondition.GreaterThan(100.0f);
+ Assert.IsNotNull(dummycondition, "should not be null.");
+ Assert.IsInstanceOf<PropertyCondition>(dummycondition, "should be an instance of PropertyCondition class!");
+
+ var dummyNotification = dummyView.AddPropertyNotification("PositionX", dummycondition);
+ Assert.IsNotNull(dummyNotification, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(dummyNotification, "should be an instance of PropertyNotification class!");
+
+ var result = dummyNotification.GetCondition();
+ Assert.IsNotNull(result, "should not be null.");
+ Assert.IsInstanceOf<PropertyCondition>(result, "should be an instance of PropertyCondition class!");
+
+ Assert.IsTrue(result == dummycondition);
+
+ result.Dispose();
+ dummyNotification.Dispose();
+ dummycondition.Dispose();
+ dummyView.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationGetCondition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification GetTargetProperty")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.GetTargetProperty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationGetTargetProperty()
+ {
+ tlog.Debug(tag, $"PropertyNotificationGetTargetProperty START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+
+ var testingTarget = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ Assert.AreEqual(13, testingTarget.GetTargetProperty(), "Retrive testingTarget.GetTargetProperty() should equal to 13.");
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationGetTargetProperty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification GetNotifyMode")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.GetNotifyMode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationGetNotifyMode()
+ {
+ tlog.Debug(tag, $"PropertyNotificationGetNotifyMode START");
+
+ View view = new View();
+ var testingTarget = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ var result = testingTarget.GetNotifyMode();
+ Assert.IsNotNull(result, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification.NotifyMode>(result, "should be an instance of PropertyNotification.NotifyMode class!");
+ Assert.IsTrue(PropertyNotification.NotifyMode.NotifyOnTrue == result);
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationGetNotifyMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification SetNotifyMode")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.SetNotifyMode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationSetNotifyMode()
+ {
+ tlog.Debug(tag, $"PropertyNotificationSetNotifyMode START");
+
+ View view = new View();
+ var testingTarget = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ testingTarget.SetNotifyMode(PropertyNotification.NotifyMode.NotifyOnChanged);
+ var result = testingTarget.GetNotifyMode();
+ Assert.IsNotNull(result, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification.NotifyMode>(result, "should be an instance of PropertyNotification.NotifyMode class!");
+ Assert.IsTrue(PropertyNotification.NotifyMode.NotifyOnChanged == result);
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationSetNotifyMode END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification GetNotifyResult.")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.GetNotifyResult M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationGetNotifyResult()
+ {
+ tlog.Debug(tag, $"PropertyNotificationGetNotifyResult START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+
+ var testingTarget = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ testingTarget.SetNotifyMode(PropertyNotification.NotifyMode.NotifyOnChanged);
+ testingTarget.Notified += (obj, e) =>
+ {
+ tlog.Fatal("TCT", "Notified!");
+ };
+ view.Position = new Position(0.0f, 0.0f, 0.0f);
+ Assert.AreEqual(false, testingTarget.GetNotifyResult(), "Should be equal!");
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationGetNotifyResult END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification Notified")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.Notified E")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "EVL")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task PropertyNotificationNotified()
+ {
+ tlog.Debug(tag, $"PropertyNotificationNotified START");
+
+ View view = new View();
+ Window.Instance.Add(view);
+ var testingTarget = view.AddPropertyNotification("positionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ testingTarget.SetNotifyMode(PropertyNotification.NotifyMode.NotifyOnChanged);
+ bool flag = false;
+ testingTarget.Notified += (obj, e) =>
+ {
+ flag = true;
+ };
+
+ view.Position = new Position(300.0f, 0.0f, 0.0f);
+ await Task.Delay(200);
+ Assert.AreEqual(true, flag, "Should be equal!");
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationNotified END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification Dispose")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.Dispose M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR MCST")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationDispose()
+ {
+ tlog.Debug(tag, $"PropertyNotificationDispose START");
+
+ var testingTarget = new PropertyNotification();
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ try
+ {
+ testingTarget.Dispose();
+ }
+ catch (Exception e)
+ {
+ LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+ Assert.Fail("Caught Exception" + e.ToString());
+ }
+
+ tlog.Debug(tag, $"PropertyNotificationDispose END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification DownCast")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.DownCast M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationDownCast()
+ {
+ tlog.Debug(tag, $"PropertyNotificationDownCast START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+
+ Window.Instance.Add(view);
+ var testingTarget = view.AddPropertyNotification("positionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ var result = PropertyNotification.DownCast(testingTarget);
+ Assert.IsNotNull(result, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(result, "should be an instance of PropertyNotification class!");
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationDownCast END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification NotifySignal")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.NotifySignal M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public async Task PropertyNotificationNotifySignal()
+ {
+ tlog.Debug(tag, $"PropertyNotificationNotifySignal START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+
+ Window.Instance.Add(view);
+ var testingTarget = view.AddPropertyNotification("positionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ testingTarget.SetNotifyMode(PropertyNotification.NotifyMode.NotifyOnChanged);
+ bool flag = false;
+ testingTarget.Notified += (obj, e) =>
+ {
+ flag = true;
+ };
+ view.Position = new Position(300.0f, 0.0f, 0.0f);
+ await Task.Delay(200);
+
+ var result = testingTarget.NotifySignal();
+ Assert.IsNotNull(result, "Should be not null");
+ Assert.IsInstanceOf<PropertyNotifySignal>(result, "Should be an instance of propertyNotifySignal");
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationNotifySignal END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification Assign")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationAssign()
+ {
+ tlog.Debug(tag, $"PropertyNotificationAssign START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+ Window.Instance.Add(view);
+
+ var dummy1 = view.AddPropertyNotification("positionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(dummy1, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(dummy1, "should be an instance of PropertyNotification class!");
+
+ var dummy2 = view.AddPropertyNotification("positionY", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(dummy2, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(dummy2, "should be an instance of PropertyNotification class!");
+
+ var testingTarget = dummy2.Assign(dummy1);
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ testingTarget.Dispose();
+ dummy2.Dispose();
+ dummy1.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationAssign END (OK)");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("PropertyNotification Assign, negative")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.Assign M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationAssignNegative()
+ {
+ tlog.Debug(tag, $"PropertyNotificationAssignNegative START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+ Window.Instance.Add(view);
+
+ var testingTarget = view.AddPropertyNotification("positionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(testingTarget, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(testingTarget, "should be an instance of PropertyNotification class!");
+
+ try
+ {
+ testingTarget.Assign(null);
+ Assert.Fail("Should throw the System.ArgumentNullException!");
+ }
+ catch (ArgumentNullException e)
+ {
+ Assert.True(true);
+ }
+
+ testingTarget.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotificationAssignNegative END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification.NotifyEventArgs constructor")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.NotifyEventArgs.NotifyEventArgs C")]
+ [Property("SPEC_URL", " - ")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationNotifyEventArgsContructor()
+ {
+ tlog.Debug(tag, $"PropertyNotificationNotifyEventArgsContructor START");
+
+ var testingTarget = new PropertyNotification.NotifyEventArgs();
+ Assert.NotNull(testingTarget, "Should be not null");
+ Assert.IsInstanceOf<PropertyNotification.NotifyEventArgs>(testingTarget, "Should be an instance of PropertyNotification.PropertyNotificationNotifyEventArgs");
+
+ tlog.Debug(tag, $"PropertyNotificationNotifyEventArgsContructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotification.NotifyEventArgs GetTargetProperty")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotification.NotifyEventArgs.PropertyNotification A")]
+ [Property("SPEC_URL", " - ")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotificationNotifyEventArgsGetTargetProperty()
+ {
+ tlog.Debug(tag, $"PropertyNotificationNotifyEventArgsGetTargetProperty START");
+
+ var view = new View();
+ Assert.IsNotNull(view, "should not be null.");
+ Assert.IsInstanceOf<View>(view, "should be an instance of View class!");
+
+ var dummy = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(dummy, "should not be null.");
+ Assert.IsInstanceOf<PropertyNotification>(dummy, "should be an instance of PropertyNotification class!");
+
+ var testingTarget = new PropertyNotification.NotifyEventArgs();
+ Assert.NotNull(testingTarget, "Should be not null");
+ Assert.IsInstanceOf<PropertyNotification.NotifyEventArgs>(testingTarget, "Should be an instance of PropertyNotification.PropertyNotificationNotifyEventArgs");
+
+ testingTarget.PropertyNotification = dummy;
+ Assert.AreEqual(13, testingTarget.PropertyNotification.GetTargetProperty(), "Should be equal!");
+
+ dummy.Dispose();
+ view.Dispose();
+
+ tlog.Debug(tag, $"PropertyNotificationNotifyEventArgsGetTargetProperty 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.testcase
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/Common/PropertyNotifySignal")]
+ class PublicPropertyNotifySignalTest
+ {
+ private const string tag = "NUITEST";
+ private delegate void dummyCallback();
+ private void OnDummyCallback()
+ { }
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotifySignal constructor.")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotifySignal.PropertyNotifySignal C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotifySignalConstructor()
+ {
+ tlog.Debug(tag, $"PropertyNotifySignalConstructor START");
+
+ var testingTarget = new PropertyNotifySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyNotifySignal>(testingTarget, "Should be an Instance of PropertyNotifySignal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyNotifySignalConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotifySignal Empty")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotifySignal.Empty M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotifySignalEmpty()
+ {
+ tlog.Debug(tag, $"PropertyNotifySignalEmpty START");
+
+ var testingTarget = new PropertyNotifySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyNotifySignal>(testingTarget, "Should be an Instance of PropertyNotifySignal!");
+
+ Assert.IsTrue(testingTarget.Empty());
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyNotifySignalEmpty END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotifySignal GetConnectionCount")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotifySignal.GetConnectionCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotifySignalGetConnectionCount()
+ {
+ tlog.Debug(tag, $"PropertyNotifySignalGetConnectionCount START");
+
+ var testingTarget = new PropertyNotifySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyNotifySignal>(testingTarget, "Should be an Instance of PropertyNotifySignal!");
+
+ Assert.AreEqual(0, testingTarget.GetConnectionCount(), "Should be zero!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyNotifySignalGetConnectionCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotifySignal Connect")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotifySignal.Connect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotifySignalConnect()
+ {
+ tlog.Debug(tag, $"PropertyNotifySignalConnect START");
+
+ var testingTarget = new PropertyNotifySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyNotifySignal>(testingTarget, "Should be an Instance of PropertyNotifySignal!");
+
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyNotifySignalConnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotifySignal Disconnect")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotifySignal.Disconnect M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotifySignalDisconnect()
+ {
+ tlog.Debug(tag, $"PropertyNotifySignalDisconnect START");
+
+ var testingTarget = new PropertyNotifySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyNotifySignal>(testingTarget, "Should be an Instance of PropertyNotifySignal!");
+
+ dummyCallback callback = OnDummyCallback;
+ testingTarget.Connect(callback);
+ testingTarget.Disconnect(callback);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyNotifySignalDisconnect END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyNotifySignal Emit")]
+ [Property("SPEC", "Tizen.NUI.PropertyNotifySignal.Emit M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyNotifySignalEmit()
+ {
+ tlog.Debug(tag, $"PropertyNotifySignalEmit START");
+
+ var testingTarget = new PropertyNotifySignal();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyNotifySignal>(testingTarget, "Should be an Instance of PropertyNotifySignal!");
+
+ View view = new View()
+ {
+ Size = new Size(200, 200),
+ BackgroundColor = Color.Red
+ };
+ Window.Instance.Add(view);
+
+ var dummy = view.AddPropertyNotification("PositionX", PropertyCondition.GreaterThan(100.0f));
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<PropertyNotification>(dummy, "Should be an Instance of PropertyNotification!");
+
+ testingTarget.Emit(dummy);
+
+ testingTarget.Dispose();
+ dummy.Dispose();
+ view.Dispose();
+ tlog.Debug(tag, $"PropertyNotifySignalEmit 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/Common/PropertyValue")]
+ class PublicPropertyValueTest
+ {
+ 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("PropertyValue constructor")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructor()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructor START");
+
+ var testingTarget = new PropertyValue();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with bool")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithBool()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithBool START");
+
+ var testingTarget = new PropertyValue(true);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithBool END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with int")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithInt()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithInt START");
+
+ var testingTarget = new PropertyValue(5);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithInt END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with float")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithFoloat()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithFoloat START");
+
+ var testingTarget = new PropertyValue(6.0f);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithFoloat END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Vector2")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithVector2()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithVector2 START");
+
+ var testingTarget = new PropertyValue(new Vector2(1.0f, 2.0f));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithVector2 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Size")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithSize()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithSize START");
+
+ var testingTarget = new PropertyValue(new Size(1, 2));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithSize END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Vector3")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithVector3()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithVector3 START");
+
+ var testingTarget = new PropertyValue(new Vector3(1.0f, 2.0f, 3.0f));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithVector3 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Position2D")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithPosition2D()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithPosition2D START");
+
+ var testingTarget = new PropertyValue(new Position2D(1, 2));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithPosition2D END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Position")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithPosition()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithPosition START");
+
+ var testingTarget = new PropertyValue(new Position(1.0f, 2.0f, 3.0f));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithPosition END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Vector4")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithVector4()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithVector4 START");
+
+ var testingTarget = new PropertyValue(new Vector4(1.0f, 2.0f, 3.0f, 4.0f));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithVector4 END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Extents")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithExtents()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithExtents START");
+
+ var testingTarget = new PropertyValue(new Extents(1, 2, 3, 4));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithExtents END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Color")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithColor()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithColor START");
+
+ var testingTarget = new PropertyValue(new Color(1.0f, 1.0f, 1.0f, 0.5f));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithColor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Rectangle")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithRectangle()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithRectangle START");
+
+ var testingTarget = new PropertyValue(new Rectangle(1, 2, 100, 200));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithRectangle END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with Rotation")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithRotation()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithRotation START");
+
+ var dummy = new Rotation();
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<Rotation>(dummy, "Should return Rotation instance.");
+
+ var testingTarget = new PropertyValue(dummy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithRotation END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with string")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithString()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithString START");
+
+ var testingTarget = new PropertyValue("DALI");
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithString END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with PropertyArray")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithPropertyArray()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyArray START");
+
+ PropertyArray dummy_array = new PropertyArray();
+ Assert.IsNotNull(dummy_array, "Should be not null!");
+ Assert.IsInstanceOf<PropertyArray>(dummy_array, "Should return PropertyArray instance.");
+
+ PropertyValue dummy_value1 = new PropertyValue(14.0f);
+ Assert.IsNotNull(dummy_value1, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(dummy_value1, "Should return PropertyValue instance.");
+
+ PropertyValue dummy_value2 = new PropertyValue(15.0f);
+ Assert.IsNotNull(dummy_value2, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(dummy_value2, "Should return PropertyValue instance.");
+
+ dummy_array.Add(dummy_value1);
+ dummy_array.Add(dummy_value2);
+
+ var testingTarget = new PropertyValue(dummy_array);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ dummy_value2.Dispose();
+ dummy_value1.Dispose();
+ dummy_array.Dispose();
+
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyArray END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with PropertyMap")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithPropertyMap()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyMap START");
+
+ var dummy = new PropertyMap();
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<PropertyMap>(dummy, "Should return PropertyMap instance.");
+
+ dummy.Add("hello", new PropertyValue(400.0f));
+ dummy.Add("world", new PropertyValue(500.0f));
+
+ var testingTarget = new PropertyValue(dummy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyMap END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with PropertyType")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithPropertyType()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyType START");
+
+ var testingTarget = new PropertyValue(PropertyType.Float);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue constructor with PropertyValue")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.PropertyValue C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueConstructorWithPropertyValue()
+ {
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyValue START");
+
+ var dummy = new PropertyValue(5);
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "Should return PropertyValue instance.");
+
+ var testingTarget = new PropertyValue(dummy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should return PropertyValue instance.");
+
+ testingTarget.Dispose();
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyValueConstructorWithPropertyValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue CreateFromObject")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.CreateFromObject M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueCreateFromObject()
+ {
+ tlog.Debug(tag, $"PropertyValueCreateFromObject START");
+
+ Position pos = new Position(10.0f, 20.0f, 30.0f);
+ var testingTarget = PropertyValue.CreateFromObject(pos);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueCreateFromObject END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue GetType")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.GetType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetType()
+ {
+ tlog.Debug(tag, $"PropertyValueGetType START");
+
+ var dummy = new PropertyValue(2);
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(dummy, "should be an Instance of PropertyValue class.");
+
+ var testingTarget = dummy.GetType();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.AreEqual(PropertyType.Integer, testingTarget, "should be equal.");
+
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetType END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Bool value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetBoolValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetBoolValue START");
+
+ var testingTarget = new PropertyValue(false);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "should be an Instance of PropertyValue class.");
+
+ bool result = true;
+ testingTarget.Get(out result);
+ Assert.IsTrue(false == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetBoolValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Float value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetFloatValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetFloatValue START");
+
+ var testingTarget = new PropertyValue(12.0f);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "should be an Instance of PropertyValue class.");
+
+ float result = 0.0f;
+ testingTarget.Get(out result);
+ Assert.IsTrue(12.0f == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetFloatValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Integer value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetIntegerValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetIntegerValue START");
+
+ var testingTarget = new PropertyValue(20);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "should be an Instance of PropertyValue class.");
+
+ int result = 0;
+ testingTarget.Get(out result);
+ Assert.IsTrue(20 == result);
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetIntegerValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Rectangle value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetRectangleValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetRectangleValue START");
+
+ var testingTarget = new PropertyValue(new Rectangle(1, 2, 3, 4));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "should be an Instance of PropertyValue class.");
+
+ Rectangle rectangle = new Rectangle(0, 0, 0, 0);
+ var result = testingTarget.Get(rectangle);
+ Assert.IsTrue(result);
+
+ Assert.AreEqual(1, rectangle.X, "should be eaqual.");
+ Assert.AreEqual(2, rectangle.Y, "should be eaqual.");
+ Assert.AreEqual(3, rectangle.Width, "should be eaqual.");
+ Assert.AreEqual(4, rectangle.Height, "should be eaqual.");
+
+ rectangle.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetRectangleValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Size2D value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetSize2DValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetSize2DValue START");
+
+ var testingTarget = new PropertyValue(new Size2D(1, 2));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "should be an Instance of PropertyValue class.");
+
+ Size2D size = new Size2D(3, 4);
+ var result = testingTarget.Get(size);
+ Assert.IsTrue(result);
+
+ Assert.AreEqual(1, size.Width, "Get function with Size2D parameter does not work, Size2D.Width is not right");
+ Assert.AreEqual(2, size.Height, "Get function with Size2D parameter does not work, Size2D.Height is not right");
+
+ size.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetSize2DValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Position value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetPositionValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetPositionValue START");
+
+ var testingTarget = new PropertyValue(new Position(1, 2, 3));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ Position position = new Position(4, 5, 6);
+ var result = testingTarget.Get(position);
+ Assert.IsTrue(result);
+
+ Assert.AreEqual(1, position.X, "should be eaqual.");
+ Assert.AreEqual(2, position.Y, "should be eaqual.");
+ Assert.AreEqual(3, position.Z, "should be eaqual.");
+
+ position.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetPositionValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Position2D value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetPosition2DValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetPosition2DValue START");
+
+ var testingTarget = new PropertyValue(new Position2D(1, 2));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ Position2D position = new Position2D(4, 5);
+ var result = testingTarget.Get(position);
+ Assert.IsTrue(result);
+
+ Assert.AreEqual(1, position.X, "should be eaqual.");
+ Assert.AreEqual(2, position.Y, "should be eaqual.");
+
+ position.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetPosition2DValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Vector2 value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetVector2Value()
+ {
+ tlog.Debug(tag, $"PropertyValueGetVector2Value START");
+
+ var testingTarget = new PropertyValue();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "should be an Instance of PropertyValue class.");
+
+ var dummy = new Vector2(1, 2);
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<Vector2>(dummy, "should be an Instance of PropertyValue class.");
+
+ testingTarget.Get(dummy);
+ Assert.IsTrue(1 == dummy.X);
+ Assert.IsTrue(2 == dummy.Y);
+
+ tlog.Debug(tag, $"PropertyValueGetVector2Value END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Vector3 value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetVector3Value()
+ {
+ tlog.Debug(tag, $"PropertyValueGetVector3Value START");
+
+ PropertyValue testingTarget = new PropertyValue(new Vector3(1, 2, 3));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ Vector3 vector = new Vector3(3, 2, 1);
+ var result = testingTarget.Get(vector);
+ Assert.IsTrue(result);
+
+ Assert.AreEqual(1, vector.X, "Get function with Vector3 parameter does not work, Vector.X is not right");
+ Assert.AreEqual(2, vector.Y, "Get function with Vector3 parameter does not work, Vector.Y is not right");
+ Assert.AreEqual(3, vector.Z, "Get function with Vector3 parameter does not work, Vector.Z is not right");
+
+ vector.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetVector3Value END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Vector4 value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetVector4Value()
+ {
+ tlog.Debug(tag, $"PropertyValueGetVector4Value START");
+
+ var testingTarget = new PropertyValue(new Vector4(10, 20, 30, 40));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ Vector4 vector = new Vector4(100, 200, 300, 400);
+ var result = testingTarget.Get(vector);
+ Assert.IsTrue(result);
+
+ Assert.AreEqual(10, vector.X, "should be eaqual.");
+ Assert.AreEqual(20, vector.Y, "should be eaqual.");
+ Assert.AreEqual(30, vector.Z, "should be eaqual.");
+ Assert.AreEqual(40, vector.W, "should be eaqual.");
+
+ vector.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetVector4Value END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Extents value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetExtentsValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetExtentsValue START");
+
+ var testingTarget = new PropertyValue(new Extents(1, 2, 3, 4));
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ Extents extents = new Extents(0, 0, 0, 0);
+ var result = testingTarget.Get(extents);
+ Assert.IsTrue(result);
+
+ Assert.AreEqual(1, extents.Start, "should be eaqual.");
+ Assert.AreEqual(2, extents.End, "should be eaqual.");
+ Assert.AreEqual(3, extents.Top, "should be eaqual.");
+ Assert.AreEqual(4, extents.Bottom, "should be eaqual.");
+
+ extents.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetExtentsValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Color value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetColorValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetColorValue START");
+
+ Color dummy = new Color(1.0f, 0.5f, 1.0f, 0.5f);
+ var testingTarget = new PropertyValue(dummy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ Color color = new Color(0, 0, 0, 0);
+ testingTarget.Get(color);
+ Assert.AreEqual(1.0f, color.R, "Get function with Color parameter does not work, color.R is not right.");
+ Assert.AreEqual(0.5f, color.G, "Get function with Color parameter does not work, color.G is not right.");
+ Assert.AreEqual(1.0f, color.B, "Get function with Color parameter does not work, color.B is not right.");
+ Assert.AreEqual(0.5f, color.A, "Get function with Color parameter does not work, color.A is not right.");
+
+ color.Dispose();
+ testingTarget.Dispose();
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetColorValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. Rotation value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetRotationValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetRotationValue START");
+
+ var dummy = new Rotation(new Radian(6.0f), new Vector3(1.0f, 2.0f, 3.0f));
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<Rotation>(dummy, "Should be an Instance of Rotation class!");
+
+ var testingTarget = new PropertyValue(dummy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ Rotation rotation = new Rotation();
+ var result = testingTarget.Get(rotation);
+ Assert.IsTrue(result);
+
+ Radian angle = new Radian(20.0f);
+ Vector3 axis = new Vector3(0, 0, 0);
+ rotation.GetAxisAngle(axis, angle);
+ Assert.AreEqual(0.27f, float.Parse(axis.X.ToString("F2")), "shoule be eaqual.");
+ Assert.AreEqual(0.53f, float.Parse(axis.Y.ToString("F2")), "shoule be eaqual.");
+ Assert.AreEqual(0.80f, float.Parse(axis.Z.ToString("F2")), "shoule be eaqual.");
+
+ testingTarget.Dispose();
+ rotation.Dispose();
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetRotationValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. String value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetPropertyStringValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetPropertyStringValue START");
+
+ var testingTarget = new PropertyValue("DALI");
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ string result = "";
+ testingTarget.Get(out result);
+ Assert.AreEqual("DALI", result, "should be eaqual.");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetPropertyStringValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. PropertyArray value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetPropertyArrayValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetPropertyArrayValue START");
+
+ PropertyArray propertyArray = new PropertyArray();
+ propertyArray.Add(new PropertyValue(3.0f));
+
+ PropertyValue propertyValue = new PropertyValue(propertyArray);
+
+ var testingTarget = new PropertyArray();
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyArray>(testingTarget, "Should be an Instance of PropertyArray class!");
+
+ var result = propertyValue.Get(testingTarget);
+ Assert.IsTrue(result);
+
+ float temp = 0.0f;
+ testingTarget[0].Get(out temp);
+ Assert.AreEqual(3.0f, temp, "should be eaqual.");
+
+ testingTarget.Dispose();
+ propertyValue.Dispose();
+ propertyArray.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetPropertyArrayValue END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("PropertyValue Get. PropertyMap value")]
+ [Property("SPEC", "Tizen.NUI.PropertyValue.Get M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void PropertyValueGetPropertyMapValue()
+ {
+ tlog.Debug(tag, $"PropertyValueGetPropertyMapValue START");
+
+ var dummy = new PropertyMap();
+ Assert.IsNotNull(dummy, "Should be not null!");
+ Assert.IsInstanceOf<PropertyMap>(dummy, "Should be an Instance of PropertyMap class!");
+ dummy.Add(2, new PropertyValue(400.0f));
+
+ var testingTarget = new PropertyValue(dummy);
+ Assert.IsNotNull(testingTarget, "Should be not null!");
+ Assert.IsInstanceOf<PropertyValue>(testingTarget, "Should be an Instance of PropertyValue class!");
+
+ PropertyMap propertyMap = new PropertyMap();
+ var result = testingTarget.Get(propertyMap);
+ Assert.IsTrue(result);
+
+ PropertyValue propertyValue = propertyMap[2];
+ float temp = 0.0f;
+ propertyValue.Get(out temp);
+ Assert.AreEqual(400.0f, temp, "should be eaqual.");
+
+ testingTarget.Dispose();
+ dummy.Dispose();
+ tlog.Debug(tag, $"PropertyValueGetPropertyMapValue 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/Common/TypeInfo")]
+ class PublicTypeInfoTest
+ {
+ 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("TypeInfo constructor")]
+ [Property("SPEC", "Tizen.NUI.TypeInfo.TypeInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TypeInfoConstructor()
+ {
+ tlog.Debug(tag, $"TypeInfoConstructor START");
+
+ var testingTarget = new TypeInfo();
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget, "should be an instance of testing target class!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TypeInfoConstructor END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeInfo constructor. With TypeInfo instance")]
+ [Property("SPEC", "Tizen.NUI.TypeInfo.TypeInfo C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TypeInfoConstructorWithTypeInfo()
+ {
+ tlog.Debug(tag, $"TypeInfoConstructorWithTypeInfo START");
+
+ var testingTarget = TypeRegistry.Get().GetTypeInfo("PushButton");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget, "should be an instance of testing target class!");
+
+ var testingTarget2 = new TypeInfo(testingTarget);
+ Assert.IsNotNull(testingTarget2, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget2, "Should be an instance of TypeInfo type.");
+
+ testingTarget2.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TypeInfoConstructorWithTypeInfo END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeInfo CreateInstance")]
+ [Property("SPEC", "Tizen.NUI.TypeInfo.CreateInstance M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TypeInfoCreateInstance()
+ {
+ tlog.Debug(tag, $"TypeInfoCreateInstance START");
+
+ var testingTarget = TypeRegistry.Get().GetTypeInfo("PushButton");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget, "should be an instance of testing target class!");
+
+ var baseHandle = testingTarget.CreateInstance();
+ Assert.IsNotNull(baseHandle, "should be not null");
+ Assert.IsInstanceOf<BaseHandle>(baseHandle, "Should be an instance of BaseHandle type.");
+
+ baseHandle.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TypeInfoCreateInstance END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeInfo GetBaseName")]
+ [Property("SPEC", "Tizen.NUI.TypeInfo.GetBaseName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TypeInfoGetBaseName()
+ {
+ tlog.Debug(tag, $"TypeInfoGetBaseName START");
+
+ var testingTarget = TypeRegistry.Get().GetTypeInfo("PushButton");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget, "should be an instance of testing target class!");
+ Assert.AreEqual("Button", testingTarget.GetBaseName(), "Should be equal");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TypeInfoGetBaseName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeInfo GetName")]
+ [Property("SPEC", "Tizen.NUI.TypeInfo.GetName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TypeInfoGetName()
+ {
+ tlog.Debug(tag, $"TypeInfoGetName START");
+
+ var testingTarget = TypeRegistry.Get().GetTypeInfo("PushButton");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget, "should be an instance of testing target class!");
+ Assert.AreEqual("PushButton", testingTarget.GetName(), "Should be equal");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TypeInfoGetName END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeInfo GetPropertyCount")]
+ [Property("SPEC", "Tizen.NUI.TypeInfo.GetPropertyCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TypeInfoGetPropertyCount()
+ {
+ tlog.Debug(tag, $"TypeInfoGetPropertyCount START");
+
+ var testingTarget = TypeRegistry.Get().GetTypeInfo("PushButton");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget, "should be an instance of testing target class!");
+ Assert.Greater(testingTarget.GetPropertyCount(), 0, "The property count should greater than 0");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TypeInfoGetPropertyCount END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TypeInfo GetPropertyName")]
+ [Property("SPEC", "Tizen.NUI.TypeInfo.GetPropertyName M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "guowei.wang@samsung.com")]
+ public void TypeInfoGetPropertyName()
+ {
+ tlog.Debug(tag, $"TypeInfoGetPropertyName START");
+
+ var testingTarget = TypeRegistry.Get().GetTypeInfo("ImageView");
+ Assert.IsNotNull(testingTarget, "should be not null");
+ Assert.IsInstanceOf<TypeInfo>(testingTarget, "should be an instance of testing target class!");
+
+ var view = new ImageView();
+ Assert.IsNotNull(view, "should be not null");
+ Assert.IsInstanceOf<ImageView>(view, "should be an instance of ImageView class!");
+
+ int pIndex = view.GetPropertyIndex("image");
+ Assert.AreEqual("image", testingTarget.GetPropertyName(pIndex), "Should be equal");
+
+ view.Dispose();
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TypeInfoGetPropertyName END (OK)");
+ }
+ }
+}