[NUI][ACR-214][Add TCs for coverage] 85/205285/2
authordongsug.song <dongsug.song@samsung.com>
Thu, 2 May 2019 04:23:49 +0000 (13:23 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Thu, 2 May 2019 05:04:36 +0000 (14:04 +0900)
Change-Id: Ib46559ef3638263fd86becd9746077e5c38e15ca
Signed-off-by: dongsug.song <dongsug.song@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 613227b9a674d001a0a4bddebc9a71329d9f1945..9b60fa48352d2520687625ef5da3465769e5fa27 100755 (executable)
@@ -666,8 +666,8 @@ namespace Tizen.NUI.Tests
             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
+            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");
@@ -1116,30 +1116,30 @@ namespace Tizen.NUI.Tests
         [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
         public async Task ScrollStateChanged_CHECK_EVENT()
         {
-            var textEditor = new TextEditor()\r
-            {\r
-                Size2D = new Size2D(100, 60),\r
-                Text = "Hello Hello World World",\r
-                Focusable = true,\r
-            };\r
+            var textEditor = new TextEditor()
+            {
+                Size2D = new Size2D(100, 60),
+                Text = "Hello Hello World World",
+                Focusable = true,
+            };
             Window.Instance.Add(textEditor);
-            try\r
-            {\r
-                textEditor.ScrollStateChanged += OnScrollStateChanged;\r
-                FocusManager.Instance.SetCurrentFocusView(textEditor);\r
-                await Task.Delay(500);\r
-                Assert.IsTrue(_flagScrollStateChanged, "ScrollStateChanged is not be called");\r
+            try
+            {
+                textEditor.ScrollStateChanged += OnScrollStateChanged;
+                FocusManager.Instance.SetCurrentFocusView(textEditor);
+                await Task.Delay(500);
+                Assert.IsTrue(_flagScrollStateChanged, "ScrollStateChanged is not be called");
             }
-            catch (Exception e)\r
-            {\r
-                Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());\r
-                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());\r
-                Assert.Fail("Caught Exception" + e.ToString());\r
+            catch (Exception e)
+            {
+                Tizen.Log.Error(TAG, "Caught Exception" + e.ToString());
+                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+                Assert.Fail("Caught Exception" + e.ToString());
             }
             finally
-            {\r
-                textEditor.ScrollStateChanged -= OnScrollStateChanged;\r
-                Window.Instance.Remove(textEditor);\r
+            {
+                textEditor.ScrollStateChanged -= OnScrollStateChanged;
+                Window.Instance.Remove(textEditor);
             }
         }
 
@@ -1152,17 +1152,40 @@ namespace Tizen.NUI.Tests
         [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
         public void MatchSystemLanguageDirectionProperty_CHECK_VALUE()
         {
-            var textEditor = new TextEditor();\r
-            Assert.IsNotNull(textEditor, "Can't create success object TextEditor");\r
-            Assert.IsInstanceOf<TextEditor>(textEditor, "Should be an instance of TextEditor type.");\r
-\r
-            textEditor.SetValue(TextEditor.MatchSystemLanguageDirectionProperty, false);\r
-            bool ret = (bool)textEditor.GetValue(TextEditor.MatchSystemLanguageDirectionProperty);\r
-            Assert.AreEqual(false, ret, "should be same");\r
-\r
-            textEditor.SetValue(TextEditor.MatchSystemLanguageDirectionProperty, true);\r
-            ret = (bool)textEditor.GetValue(TextEditor.MatchSystemLanguageDirectionProperty);\r
+            var textEditor = new TextEditor();
+            Assert.IsNotNull(textEditor, "Can't create success object TextEditor");
+            Assert.IsInstanceOf<TextEditor>(textEditor, "Should be an instance of TextEditor type.");
+
+            textEditor.SetValue(TextEditor.MatchSystemLanguageDirectionProperty, false);
+            bool ret = (bool)textEditor.GetValue(TextEditor.MatchSystemLanguageDirectionProperty);
+            Assert.AreEqual(false, ret, "should be same");
+
+            textEditor.SetValue(TextEditor.MatchSystemLanguageDirectionProperty, true);
+            ret = (bool)textEditor.GetValue(TextEditor.MatchSystemLanguageDirectionProperty);
             Assert.AreEqual(true, ret, "should be same");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test MatchSystemLanguageDirection. Check whether MatchSystemLanguageDirection is working correctly or not.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.MatchSystemLanguageDirection A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void MatchSystemLanguageDirection_CHECK_VALUE()
+        {
+            var textEditor = new TextEditor();
+            Assert.IsNotNull(textEditor, "Can't create success object TextEditor");
+            Assert.IsInstanceOf<TextEditor>(textEditor, "Should be an instance of TextEditor type.");
+
+            textEditor.MatchSystemLanguageDirection = false;
+            bool ret = textEditor.MatchSystemLanguageDirection;
+            Assert.AreEqual(false, ret, "should be same");
+
+            textEditor.MatchSystemLanguageDirection = true;
+            ret = textEditor.MatchSystemLanguageDirection;
+            Assert.AreEqual(true, ret, "should be same");
+        }
+
     }
 }
index d1f91cd3fa886e8cbdd4fe7d35088f65fd16b1c1..e361263413cb84a61a488eb2d4c0fca6317e5216 100755 (executable)
@@ -870,15 +870,15 @@ namespace Tizen.NUI.Tests
             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");\r
-\r
+            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);\r
-\r
+            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");
@@ -1194,16 +1194,38 @@ namespace Tizen.NUI.Tests
         [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
         public void MatchSystemLanguageDirectionProperty_CHECK_VALUE()
         {
-            var textField = new TextField();\r
-            Assert.IsNotNull(textField, "Can't create success object TextField");\r
-            Assert.IsInstanceOf<TextField>(textField, "Should be an instance of TextField type.");\r
-\r
-            textField.SetValue(TextField.MatchSystemLanguageDirectionProperty, false);\r
-            bool ret = (bool)textField.GetValue(TextField.MatchSystemLanguageDirectionProperty);\r
+            var textField = new TextField();
+            Assert.IsNotNull(textField, "Can't create success object TextField");
+            Assert.IsInstanceOf<TextField>(textField, "Should be an instance of TextField type.");
+
+            textField.SetValue(TextField.MatchSystemLanguageDirectionProperty, false);
+            bool ret = (bool)textField.GetValue(TextField.MatchSystemLanguageDirectionProperty);
+            Assert.AreEqual(false, ret, "should be same");
+
+            textField.SetValue(TextField.MatchSystemLanguageDirectionProperty, true);
+            ret = (bool)textField.GetValue(TextField.MatchSystemLanguageDirectionProperty);
+            Assert.AreEqual(true, ret, "should be same");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test MatchSystemLanguageDirection. Check whether MatchSystemLanguageDirection is working correctly or not.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.MatchSystemLanguageDirection A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void MatchSystemLanguageDirection_CHECK_VALUE()
+        {
+            var textField = new TextField();
+            Assert.IsNotNull(textField, "Can't create success object TextField");
+            Assert.IsInstanceOf<TextField>(textField, "Should be an instance of TextField type.");
+
+            textField.MatchSystemLanguageDirection = false;
+            bool ret = textField.MatchSystemLanguageDirection;
             Assert.AreEqual(false, ret, "should be same");
 
-            textField.SetValue(TextField.MatchSystemLanguageDirectionProperty, true);\r
-            ret = (bool)textField.GetValue(TextField.MatchSystemLanguageDirectionProperty);\r
+            textField.MatchSystemLanguageDirection = true;
+            ret = textField.MatchSystemLanguageDirection;
             Assert.AreEqual(true, ret, "should be same");
         }
     }
index c696e4ce9dfcea510af53d10a0573a09017fd6ae..73b49f41bcf62dec66ea8a00a3e45fbe7c29a2de 100755 (executable)
@@ -412,14 +412,14 @@ namespace Tizen.NUI.Tests
             map.Insert("height", value);
             textLabel.Underline = map;
             Assert.AreEqual(map.Count(), textLabel.Underline.Count(), "Retrieved Underline should be equal to 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
+            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");
@@ -712,18 +712,41 @@ namespace Tizen.NUI.Tests
         [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
         public void MatchSystemLanguageDirectionProperty_CHECK_VALUE()
         {
-            var textLabel = new TextLabel();\r
-            Assert.IsNotNull(textLabel, "Can't create success object textLabel");\r
-            Assert.IsInstanceOf<TextLabel>(textLabel, "Should be an instance of textLabel type.");\r
-\r
-            textLabel.SetValue(TextLabel.MatchSystemLanguageDirectionProperty, false);\r
-            bool ret = (bool)textLabel.GetValue(TextLabel.MatchSystemLanguageDirectionProperty);\r
+            var textLabel = new TextLabel();
+            Assert.IsNotNull(textLabel, "Can't create success object textLabel");
+            Assert.IsInstanceOf<TextLabel>(textLabel, "Should be an instance of textLabel type.");
+
+            textLabel.SetValue(TextLabel.MatchSystemLanguageDirectionProperty, false);
+            bool ret = (bool)textLabel.GetValue(TextLabel.MatchSystemLanguageDirectionProperty);
+            Assert.AreEqual(false, ret, "should be same");
+
+            textLabel.SetValue(TextLabel.MatchSystemLanguageDirectionProperty, true);
+            ret = (bool)textLabel.GetValue(TextLabel.MatchSystemLanguageDirectionProperty);
+            Assert.AreEqual(true, ret, "should be same");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test MatchSystemLanguageDirection. Check whether MatchSystemLanguageDirection is working correctly or not.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.MatchSystemLanguageDirection A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")]
+        public void MatchSystemLanguageDirection_CHECK_VALUE()
+        {
+            var textLabel = new TextLabel();
+            Assert.IsNotNull(textLabel, "Can't create success object textLabel");
+            Assert.IsInstanceOf<TextLabel>(textLabel, "Should be an instance of textLabel type.");
+
+            textLabel.MatchSystemLanguageDirection = false;
+            bool ret = textLabel.MatchSystemLanguageDirection;
             Assert.AreEqual(false, ret, "should be same");
 
-            textLabel.SetValue(TextLabel.MatchSystemLanguageDirectionProperty, true);\r
-            ret = (bool)textLabel.GetValue(TextLabel.MatchSystemLanguageDirectionProperty);\r
+            textLabel.MatchSystemLanguageDirection = true;
+            ret = textLabel.MatchSystemLanguageDirection;
             Assert.AreEqual(true, ret, "should be same");
         }
+
     }
 
     public class MyTexLabel : TextLabel