From: wenfeng.ge Date: Thu, 6 Sep 2018 08:23:11 +0000 (+0800) Subject: [NUI][ACR-152][Update TCTs for Tizen.NUI] X-Git-Tag: tct5.0_m2~63^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F188582%2F5;p=test%2Ftct%2Fcsharp%2Fapi.git [NUI][ACR-152][Update TCTs for Tizen.NUI] Change-Id: Iceeef782728e6c2b17787d98ad69ccd8356773ea Signed-off-by: wenfeng.ge --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs new file mode 100755 index 000000000..d34229b0a --- /dev/null +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs @@ -0,0 +1,50 @@ +using NUnit.Framework; +using NUnit.Framework.TUnit; +using System; +using Tizen.NUI; +using Tizen.NUI.UIComponents; +using Tizen.NUI.BaseComponents; +using System.Threading.Tasks; +using Tizen.NUI.Test; + +namespace Tizen.NUI.Tests +{ + [TestFixture] + [Description("Tizen.NUI.InputMethodContext Tests")] + public class InputMethodContextTests + { + private static string TAG = "NUI"; + + [SetUp] + public static void Init() + { + Tizen.Log.Info(TAG, "Init() is called!"); + App.MainTitleChangeText("InputMethodContextTests"); + App.MainTitleChangeBackgroundColor(null); + } + + [TearDown] + public static void Destroy() + { + Tizen.Log.Info(TAG, "Destroy() is called!"); + } + + [Test] + [Category("P1")] + [Description("Test TextPrediction. Check whether TextPrediction is readable and writable.")] + [Property("SPEC", "Tizen.NUI.InputMethodContext.TextPrediction A")] + [Property("SPEC_URL", " - ")] + [Property("CRITERIA", "PRW")] + [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")] + public void TextPrediction_SET_GET_VALUE() + { + /* TEST CODE */ + InputMethodContext inputMethodContext = new InputMethodContext(); + inputMethodContext.TextPrediction = true; + Assert.AreEqual(true, inputMethodContext.TextPrediction, "Should be true but error"); + inputMethodContext.TextPrediction = false; + Assert.AreEqual(false, inputMethodContext.TextPrediction, "should be false but error"); + } + + } +} diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.cs index b0b4c6b43..4b2062e8d 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSWindow.cs @@ -390,6 +390,44 @@ namespace Tizen.NUI.Tests } + [Test] + [Category("P1")] + [Description("Test SetKeyboardRepeatInfo.")] + [Property("SPEC", "Tizen.NUI.Window.SetKeyboardRepeatInfo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")] + public void SetKeyboardRepeatInfo_CHECK_VALUE() + { + /* TEST CODE */ + Window window = Window.Instance; + bool ret = window.SetKeyboardRepeatInfo(3.0f, 0.05f); + Assert.IsTrue(ret, "Should be true"); + float outRate, outDelay; + Tizen.Log.Debug(TAG, "return=" + ret + " window.GetKeyboardRepeatInfo() =" + window.GetKeyboardRepeatInfo(out outRate, out outDelay)); + Assert.AreEqual(3.0f, outRate, "out rate should be 3.0f but is " + outRate.ToString()); + Assert.AreEqual(0.05f, outDelay, "out delay should be 0.05f but is " + outDelay.ToString()); + } + + [Test] + [Category("P1")] + [Description("Test GetKeyboardRepeatInfo.")] + [Property("SPEC", "Tizen.NUI.Window.GetKeyboardRepeatInfo M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Wenfeng Ge, wenfeng.ge@samsung.com")] + public void GetKeyboardRepeatInfo_CHECK_VALUE() + { + /* TEST CODE */ + Window window = Window.Instance; + float outRate, outDelay; + window.SetKeyboardRepeatInfo(3.0f, 0.05f); + bool ret = window.GetKeyboardRepeatInfo(out outRate, out outDelay); + Assert.IsTrue(ret, "Should be true"); + Assert.AreEqual(3.0f, outRate, "out rate should be 3.0f but is " + outRate.ToString()); + Assert.AreEqual(0.05f, outDelay, "out delay should be 0.05f but is " + outDelay.ToString()); + } + [Test] [Category("P1")] [Description("Test KeepRendering.")]