[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 01f3a530189076ac3810d108327ea2f53aa056c8..fa37f0d26f55d6e9d493e9b65e5d87814c41af14 100755 (executable)
@@ -146,6 +146,23 @@ namespace Tizen.NUI.Tests
             Assert.IsTrue((size1.EqualTo(size2)), "Should be equal");
         }
 
+        [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.")]
index 74a0964696fac2d5a04e2a31849d4e63eb942f97..315bed373b43a30a9f5ab376c4763cc80321597d 100755 (executable)
@@ -1806,6 +1806,26 @@ namespace Tizen.NUI.Tests
             Window.Instance.GetDefaultLayer().Remove(downView);
         }
 
+        [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.")]