[NUI][ACR-179][Update TCTs for Tizen.NUI] 88/190188/2
authorwenfeng.ge <wenfeng.ge@samsung.com>
Fri, 28 Sep 2018 05:35:56 +0000 (13:35 +0800)
committerwenfeng.ge <wenfeng.ge@samsung.com>
Fri, 28 Sep 2018 06:27:30 +0000 (14:27 +0800)
Change-Id: I9a6b0902ffabc0af11c1b2245d443b76edf0fbdf
Signed-off-by: wenfeng.ge <wenfeng.ge@samsung.com>
tct-suite-vs/Tizen.NUI.Tests/testcase/TSSize.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSView.cs

index 01f3a53..fa37f0d 100755 (executable)
@@ -148,6 +148,23 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test Equals. Try to compare two Size instance by Equals.")]
+        [Property("SPEC", "Tizen.NUI.Size.Equals M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
+        public void Equals_CHECK_RETURN_VALUE()
+        {
+            /* TEST CODE */
+            Size size1 = new Size(1.0f, 2.0f, 3.0f);
+            Size size2 = new Size(1.0f, 2.0f, 3.0f);
+            Size size3 = new Size(2.0f, 2.0f, 3.0f);
+            Assert.IsTrue((size1.Equals(size2)), "Should be equal");
+            Assert.IsFalse((size1.Equals(size3)), "Should not be equal");
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test NotEqualTo. Try to compare two Size instance by NotEqualTo.")]
         [Property("SPEC", "Tizen.NUI.Size.NotEqualTo M")]
         [Property("SPEC_URL", "-")]
index 74a0964..315bed3 100755 (executable)
@@ -1808,6 +1808,26 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test NaturalSize. Check whether NaturalSize is readable.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.View.NaturalSize A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")]
+        public void NaturalSize_GET_VALUE()
+        {
+            /* TEST CODE */
+            View view = new View();
+            Assert.IsInstanceOf<Vector3>(view.NaturalSize, "Should return Vector3 instance.");
+            Assert.AreEqual(0, view.NaturalSize.Width, "The value of view's NaturalSize.Width is not correct here");
+            Assert.AreEqual(0, view.NaturalSize.Height, "The value of view's NaturalSize.Height is not correct here");
+
+            ImageView image = new ImageView(_imagePath);
+            Assert.AreEqual(150, image.NaturalSize.Width, "The value of ImageView's NaturalSize.Width is not correct here");
+            Assert.AreEqual(150, image.NaturalSize.Height, "The value of ImageView's NaturalSize.Height is not correct here");
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Test NaturalSize2D. Check whether NaturalSize2D is readable.")]
         [Property("SPEC", "Tizen.NUI.BaseComponents.View.NaturalSize2D A")]
         [Property("SPEC_URL", "-")]