--- /dev/null
+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");
+ }
+
+ }
+}
[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.")]
[Property("SPEC", "Tizen.NUI.Window.KeepRendering M")]
[Property("SPEC_URL", "-")]