From 2adfd0303f3fe82a4e654d4daf6f510a03ba9a4f Mon Sep 17 00:00:00 2001 From: "xb.teng" Date: Fri, 15 Feb 2019 11:19:31 +0800 Subject: [PATCH] [NUI][Non-ACR][Update TCTs for Tizen.NUI] Change-Id: I14b80f08221cde5481fa4e764d0bd2ec26d4d616 --- .../Tizen.NUI.Tests/testcase/TSBaseHandle.cs | 6 ++-- .../Tizen.NUI.Tests/testcase/TSCustomView.cs | 1 - .../Tizen.NUI.Tests/testcase/TSPaddingType.cs | 6 ++-- .../Tizen.NUI.Tests/testcase/TSTextEditor.cs | 28 +++++++++++++++++-- .../Tizen.NUI.Tests/testcase/TSTextField.cs | 26 +++++++++++++++-- .../Tizen.NUI.Tests/testcase/TSTextLabel.cs | 25 +++++++++++++++-- 6 files changed, 80 insertions(+), 12 deletions(-) diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs index 2e01612db..7855f4fe3 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSBaseHandle.cs @@ -270,9 +270,10 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] [Description("dali baseHandle Equality test, Check whether Equality works or not.")] - [Property("SPEC", "Tizen.NUI.BaseHandle.Equality M")] + [Property("SPEC", "Tizen.NUI.BaseHandle.== M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] + [Property("COVPARAM", "BaseHandle,BaseHandle")] [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] public void Equality_CHECK_RETURN_TYPE() { @@ -291,9 +292,10 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] [Description("dali baseHandle Inequality test, Check whether the Inequality will return the right value or not.")] - [Property("SPEC", "Tizen.NUI.BaseHandle.Inequality M")] + [Property("SPEC", "Tizen.NUI.BaseHandle.!= M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MR")] + [Property("COVPARAM", "BaseHandle,BaseHandle")] [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] public void Inequality_CHECK_RETURN_TYPE() { diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs index aafbfb2e4..97af55bbc 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSCustomView.cs @@ -298,7 +298,6 @@ namespace Tizen.NUI.Tests LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString()); Assert.Fail("Caught Exception" + e.ToString()); } - } [Test] diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs index 46e3e1f0a..e14a4f5b1 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSPaddingType.cs @@ -123,9 +123,10 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] [Description("Test Equality, Check Equality operator by comparing two PaddingType instance.")] - [Property("SPEC", "Tizen.NUI.PaddingType.Equality A")] + [Property("SPEC", "Tizen.NUI.PaddingType.== A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] + [Property("COVPARAM", "PaddingType, PaddingType")] [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] public void Equality_CHECK_VALUE() { @@ -143,9 +144,10 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] [Description("Test Inequality, Check Inequality operator by comparing two PaddingType instance.")] - [Property("SPEC", "Tizen.NUI.PaddingType.Inequality A")] + [Property("SPEC", "Tizen.NUI.PaddingType.!= A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] + [Property("COVPARAM", "PaddingType, PaddingType")] [Property("AUTHOR", "Feng Jin, feng16.jin@samsung.com")] public void Inequality_CHECK_VALUE() { diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs index 358b47eb9..dbb5ee934 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextEditor.cs @@ -1032,7 +1032,7 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] - [Description("Test LineWrapMode.Check whether TextChanged ia readable and writable.")] + [Description("Test LineWrapMode.Check whether TextChanged is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.LineWrapMode A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -1046,7 +1046,7 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] - [Description("Test TranslatablePlaceholderText.Check whether TranslatablePlaceholderText ia readable and writable.")] + [Description("Test TranslatablePlaceholderText.Check whether TranslatablePlaceholderText is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.TranslatablePlaceholderText A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -1064,7 +1064,7 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] - [Description("Test TranslatableText.Check whether TranslatableText ia readable and writable.")] + [Description("Test TranslatableText.Check whether TranslatableText is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.TranslatableText A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -1138,5 +1138,27 @@ namespace Tizen.NUI.Tests Window.Instance.Remove(textEditor); } } + + [Test] + [Category("P1")] + [Description("Test MatchSystemLanguageDirectionProperty. Check whether MatchSystemLanguageDirectionProperty(BindableProperty) is working correctly or not.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextEditor.MatchSystemLanguageDirectionProperty A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void MatchSystemLanguageDirectionProperty_CHECK_VALUE() + { + var textEditor = new TextEditor(); + Assert.IsNotNull(textEditor, "Can't create success object TextEditor"); + Assert.IsInstanceOf(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"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs index 0ca61af67..5fd8ef6f0 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextField.cs @@ -307,7 +307,7 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] - [Description("Test TranslatablePlaceholderText.Check whether TranslatablePlaceholderText ia readable and writable.")] + [Description("Test TranslatablePlaceholderText.Check whether TranslatablePlaceholderText is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.TranslatablePlaceholderText A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -325,7 +325,7 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] - [Description("Test TranslatableText.Check whether TranslatableText ia readable and writable.")] + [Description("Test TranslatableText.Check whether TranslatableText is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.TranslatableText A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -1180,5 +1180,27 @@ namespace Tizen.NUI.Tests Assert.Fail("Caught Exception" + e.ToString()); } } + + [Test] + [Category("P1")] + [Description("Test MatchSystemLanguageDirectionProperty. Check whether MatchSystemLanguageDirectionProperty(BindableProperty) is working correctly or not.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextField.MatchSystemLanguageDirectionProperty A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void MatchSystemLanguageDirectionProperty_CHECK_VALUE() + { + var textField = new TextField(); + Assert.IsNotNull(textField, "Can't create success object TextField"); + Assert.IsInstanceOf(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"); + } } } diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs index 876f9038c..8a6371c79 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSTextLabel.cs @@ -612,7 +612,7 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] - [Description("Test LineWrapMode.Check whether TextChanged ia readable and writable.")] + [Description("Test LineWrapMode.Check whether TextChanged is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.LineWrapMode A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -640,7 +640,7 @@ namespace Tizen.NUI.Tests [Test] [Category("P1")] - [Description("Test TranslatableText.Check whether TranslatableText ia readable and writable.")] + [Description("Test TranslatableText.Check whether TranslatableText is readable and writable.")] [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.TranslatableText A")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "PRW")] @@ -699,6 +699,27 @@ namespace Tizen.NUI.Tests } } + [Test] + [Category("P1")] + [Description("Test MatchSystemLanguageDirectionProperty. Check whether MatchSystemLanguageDirectionProperty(BindableProperty) is working correctly or not.")] + [Property("SPEC", "Tizen.NUI.BaseComponents.TextLabel.MatchSystemLanguageDirectionProperty A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Xianbing Teng, xb.teng@samsung.com")] + public void MatchSystemLanguageDirectionProperty_CHECK_VALUE() + { + var textLabel = new TextLabel(); + Assert.IsNotNull(textLabel, "Can't create success object textLabel"); + Assert.IsInstanceOf(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"); + } } public class MyTexLabel : TextLabel -- 2.34.1