[NUI][Non-ACR] Fix Underline TCT Fail issue 19/199619/3
authorhuiyu.eun <huiyu.eun@samsung.com>
Wed, 13 Feb 2019 08:39:46 +0000 (17:39 +0900)
committerhuiyu eun <huiyu.eun@samsung.com>
Wed, 20 Feb 2019 23:31:57 +0000 (23:31 +0000)
Change-Id: Ia37399be2ecfc14da378227814f3cf57cb160143
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs

index dbb5ee9..613227b 100755 (executable)
@@ -652,21 +652,25 @@ namespace Tizen.NUI.Tests
             TextEditor textEditor = new TextEditor();
             PropertyMap map = new PropertyMap();
             map.Clear();
-            PropertyValue value = new PropertyValue("true");
+            PropertyValue value = new PropertyValue(true);
             map.Insert("enable", value);
-            value = new PropertyValue("red");
+            value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
             map.Insert("color", value);
-            value = new PropertyValue("1");
+            value = new PropertyValue(0.1f);
             map.Insert("height", value);
             textEditor.Underline = map;
             Assert.AreEqual(map.Count(), textEditor.Underline.Count(), "Retrieved Underline's count should be equal to set value");
-            string str1, str2;
-            for (uint index = 0u; index < map.Count(); index++)
-            {
-                map.GetValue(index).Get(out str1);
-                textEditor.Underline.GetValue(index).Get(out str2);
-                Assert.AreEqual(str1, str2, index + " : should be equals to the set value");
-            }
+
+            bool enable = false;
+            Vector4 color = new Vector4();
+            float height = 0.0f;
+            textEditor.Underline.Find(0, "enable").Get(out enable);
+            textEditor.Underline.Find(0, "color").Get(color);
+            textEditor.Underline.Find(0, "height").Get(out height);\r
+\r
+            Assert.AreEqual(true, enable, "enable : should be equals to the set value");
+            Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value");
+            Assert.AreEqual(0.1f, height, "height : should be equals to the set value");
         }
 
         [Test]
index 5fd8ef6..d1f91cd 100755 (executable)
@@ -863,21 +863,25 @@ namespace Tizen.NUI.Tests
             TextField textField = new TextField();
             PropertyMap map = new PropertyMap();
             map.Clear();
-            PropertyValue value = new PropertyValue("true");
-            map.Add("enable", value);
-            value = new PropertyValue("red");
-            map.Add("color", value);
-            value = new PropertyValue("1");
-            map.Add("height", value);
+            PropertyValue value = new PropertyValue(true);
+            map.Insert("enable", value);
+            value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
+            map.Insert("color", value);
+            value = new PropertyValue(0.1f);
+            map.Insert("height", value);
             textField.Underline = map;
-            Assert.AreEqual(map.Count(), textField.Underline.Count(), "Retrieved Underline' count should be equal to set value");
-            string str1, str2;
-            for (uint index = 0u; index < map.Count(); index++)
-            {
-                map.GetValue(index).Get(out str1);
-                textField.Underline.GetValue(index).Get(out str2);
-                Assert.AreEqual(str1, str2, index + " : should be equals to the set value");
-            }
+            Assert.AreEqual(map.Count(), textField.Underline.Count(), "Retrieved Underline' count should be equal to set value");\r
+\r
+            bool enable = false;
+            Vector4 color = new Vector4();
+            float height = 0.0f;
+            textField.Underline.Find(0, "enable").Get(out enable);
+            textField.Underline.Find(0, "color").Get(color);
+            textField.Underline.Find(0, "height").Get(out height);\r
+\r
+            Assert.AreEqual(true, enable, "enable : should be equals to the set value");
+            Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value");
+            Assert.AreEqual(0.1f, height, "height : should be equals to the set value");
         }
 
 #if false // currently ACR is not yet proceed. temporarily blocked.
index 8a6371c..c696e4c 100755 (executable)
@@ -404,21 +404,25 @@ namespace Tizen.NUI.Tests
             TextLabel textLabel = new TextLabel();
             PropertyMap map = new PropertyMap();
             map.Clear();
-            PropertyValue value = new PropertyValue("true");
+            PropertyValue value = new PropertyValue(true);
             map.Insert("enable", value);
-            value = new PropertyValue("red");
+            value = new PropertyValue(new Vector4(1.0f, 0.0f, 0.0f, 1.0f));
             map.Insert("color", value);
-            value = new PropertyValue("1");
+            value = new PropertyValue(0.1f);
             map.Insert("height", value);
             textLabel.Underline = map;
             Assert.AreEqual(map.Count(), textLabel.Underline.Count(), "Retrieved Underline should be equal to set value");
-            string str1, str2;
-            for (uint index = 0u; index < map.Count(); index++)
-            {
-                map.GetValue(index).Get(out str1);
-                textLabel.Underline.GetValue(index).Get(out str2);
-                Assert.AreEqual(str1, str2, index + ": should be equals to the set value");
-            }
+\r
+            bool enable = false;
+            Vector4 color = new Vector4();
+            float height = 0.0f;
+            textLabel.Underline.Find(0, "enable").Get(out enable);
+            textLabel.Underline.Find(0, "color").Get(color);
+            textLabel.Underline.Find(0, "height").Get(out height);\r
+\r
+            Assert.AreEqual(true, enable, "enable : should be equals to the set value");
+            Assert.AreEqual(1.0f, color.R, "color : should be equals to the set value");
+            Assert.AreEqual(0.1f, height, "height : should be equals to the set value");
         }
 
         [Test]