[NUI][ACR-450] Add Hyphenation & Mixed Modes To Line Wrapping 84/263384/12
authorabdullah <abdullahhasan10@gmail.com>
Wed, 1 Sep 2021 13:30:46 +0000 (16:30 +0300)
committerabdullah <abdullahhasan10@gmail.com>
Mon, 18 Oct 2021 08:03:09 +0000 (11:03 +0300)
Added tests to read/write hyphenation & mixed line wrapping modes
for TextEditor & TextLabel.

Change-Id: I2fc3bfb5e15ceabe2715cbe586c47b384bb2a127

tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs
tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs

index dde9b3e..d7b2e1b 100755 (executable)
@@ -1255,5 +1255,23 @@ namespace Tizen.NUI.Tests
 
             textEditor.CursorPositionChanged -= handler;
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test LineWrapMode HYPHENATION/Mixed.Check whether HYPHENATION/Mixed modes are readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.LineWrapMode A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRE")]
+        [Property("AUTHOR", "Abdullah Ghujeh, a.ghujeh@samsung.com")]
+        public void LineWrapMode_SET_GET_ENUM_Hyphenation_Mixed()
+        {
+            var textEditor = new TextEditor();
+
+            textEditor.LineWrapMode = LineWrapMode.Hyphenation;
+            Assert.AreEqual(LineWrapMode.Hyphenation, textEditor.LineWrapMode, "LineWrapMode is not equal to Hyphenation!");
+
+            textEditor.LineWrapMode = LineWrapMode.Mixed;
+            Assert.AreEqual(LineWrapMode.Mixed, textEditor.LineWrapMode, "LineWrapMode is not equal to Mixed!");
+        }
     }
 }
index 50b5039..15ac65f 100755 (executable)
@@ -717,8 +717,8 @@ namespace Tizen.NUI.Tests
             Assert.IsInstanceOf<TextLabel>(textLabel, "Should be an instance of textLabel type.");
 
             textLabel.MatchSystemLanguageDirection = false;
-            Assert.AreEqual(false, textLabel.MatchSystemLanguageDirection, "should be same");\r
-\r
+            Assert.AreEqual(false, textLabel.MatchSystemLanguageDirection, "should be same");
+
             textLabel.MatchSystemLanguageDirection = true;
             Assert.AreEqual(true, textLabel.MatchSystemLanguageDirection, "should be same");
         }
@@ -761,6 +761,24 @@ namespace Tizen.NUI.Tests
             textLabel.FontSizeScale = scale;
             Assert.AreEqual(scale, textLabel.FontSizeScale, "Retrieved FontSizeScale should be equal to set value");
         }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test LineWrapMode HYPHENATION/MIXED.Check whether HYPHENATION/MIXED modes are readable and writable.")]
+        [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.LineWrapMode A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRE")]
+        [Property("AUTHOR", "Abdullah Ghujeh, a.ghujeh@samsung.com")]
+        public void LineWrapMode_SET_GET_ENUM_Hyphenation_Mixed()
+        {
+            var textLabel = new TextLabel();
+
+            textLabel.LineWrapMode = LineWrapMode.Hyphenation;
+            Assert.AreEqual(LineWrapMode.Hyphenation, textLabel.LineWrapMode, "LineWrapMode is not equal to Hyphenation!");
+
+            textLabel.LineWrapMode = LineWrapMode.Mixed;
+            Assert.AreEqual(LineWrapMode.Mixed, textLabel.LineWrapMode, "LineWrapMode is not equal to Mixed!");
+        }
     }
 
     public class MyTexLabel : TextLabel