textEditor.LineWrapMode = LineWrapMode.Mixed;
Assert.AreEqual(LineWrapMode.Mixed, textEditor.LineWrapMode, "LineWrapMode is not equal to Mixed!");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test PrimaryCursorPosition. Check default value of PrimaryCursorPosition is length of text.")]
+ [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.PrimaryCursorPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PDV")]
+ [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")]
+ public void PrimaryCursorPosition_DEFAULT_VALUE()
+ {
+ /* TEST CODE */
+ var textEditor = new TextEditor();
+ int textLen = textEditor.Text.Length;
+ Assert.AreEqual(textLen, textEditor.PrimaryCursorPosition,"Retrieved PrimaryCursorPosition value (Default) should be equal to (0))");
+
+ textEditor.Text ="Hello World!";
+ textLen = textEditor.Text.Length;
+ Assert.AreEqual(textLen, textEditor.PrimaryCursorPosition,"Retrieved PrimaryCursorPosition value (Default) should be equal to (Text.Length))");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test PrimaryCursorPosition. Check whether PrimaryCursorPosition is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.PrimaryCursorPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")]
+ public void PrimaryCursorPosition_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ var textEditor = new TextEditor();
+ textEditor.Text ="Hello World!";
+ int textLen = textEditor.Text.Length;
+
+ int expectedValue = 5;
+ textEditor.PrimaryCursorPosition = expectedValue;
+ Assert.AreEqual(expectedValue, textEditor.PrimaryCursorPosition,"Retrieved PrimaryCursorPosition value should be equal to the set value");
+ }
}
}
Assert.IsTrue(flag, "CursorPositionChanged is not be called");
textField.CursorPositionChanged -= handler;
}
+
+
+ [Test]
+ [Category("P1")]
+ [Description("Test PrimaryCursorPosition. Check default value of PrimaryCursorPosition is length of text.")]
+ [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.PrimaryCursorPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PDV")]
+ [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")]
+ public void PrimaryCursorPosition_DEFAULT_VALUE()
+ {
+ /* TEST CODE */
+ var textField = new TextField();
+ int textLen = textField.Text.Length;
+ Assert.AreEqual(textLen, textField.PrimaryCursorPosition,"Retrieved PrimaryCursorPosition value (Default) should be equal to (0))");
+
+ textField.Text ="Hello World!";
+ textLen = textField.Text.Length;
+ Assert.AreEqual(textLen, textField.PrimaryCursorPosition,"Retrieved PrimaryCursorPosition value (Default) should be equal to (Text.Length))");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test PrimaryCursorPosition. Check whether PrimaryCursorPosition is readable and writable.")]
+ [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.PrimaryCursorPosition A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Shrouq Sabah, s.sabah@samsung.com")]
+ public void PrimaryCursorPosition_SET_GET_VALUE()
+ {
+ /* TEST CODE */
+ var textField = new TextField();
+ textField.Text ="Hello World!";
+ int textLen = textField.Text.Length;
+
+ int expectedValue = 5;
+ textField.PrimaryCursorPosition = expectedValue;
+ Assert.AreEqual(expectedValue, textField.PrimaryCursorPosition,"Retrieved PrimaryCursorPosition value should be equal to the set value");
+ }
}
}