From: huiyu.eun Date: Wed, 13 Feb 2019 08:39:46 +0000 (+0900) Subject: [NUI][Non-ACR] Fix Underline TCT Fail issue X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F19%2F199619%2F3;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][Non-ACR] Fix Underline TCT Fail issue Change-Id: Ia37399be2ecfc14da378227814f3cf57cb160143 Signed-off-by: huiyu.eun --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index dbb5ee934..613227b9a 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -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); + + 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] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index 5fd8ef6f0..d1f91cd3f 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -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"); + + 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); + + 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. diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index 8a6371c79..c696e4ce9 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -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"); - } + + 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); + + 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]