[Test]
[Category("P1")]
+ [Description("Check the working of GetSelectedText method for No Exception")]
+ [Property("SPEC", "Tizen.Uix.InputMethod.InputMethodEditor.GetSelectedText M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]
+ public void GetSelectedText_NO_EXCEPTION()
+ {
+ /*
+ * TEST CODE
+ */
+ try
+ {
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: GetSelectedText_NO_EXCEPTION");
+ string text = "test";
+ text = InputMethodEditor.GetSelectedText();
+ Assert.AreNotEqual(text, "test");
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: GetSelectedText_NO_EXCEPTION");
+ }
+ catch (Exception e)
+ {
+ Helper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
+ Assert.IsTrue(false, "Caught Exception" + e.ToString());
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check the working of SendPrivateCommand method for No Exception")]
+ [Property("SPEC", "Tizen.Uix.InputMethod.InputMethodEditor.SendPrivateCommand M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]
+ public void SendPrivateCommand_NO_EXCEPTION()
+ {
+ /*
+ * TEST CODE
+ */
+ flag = false;
+ try
+ {
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: SendPrivateCommand_NO_EXCEPTION");
+ InputMethodEditor.SendPrivateCommand("Test");
+ flag = true;
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: SendPrivateCommand_NO_EXCEPTION");
+ }
+ catch (Exception e)
+ {
+ Helper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
+ Assert.IsTrue(false, "Caught Exception" + e.ToString());
+ }
+ Assert.IsTrue(flag, "Failed test");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check the working of SendPrivateCommand method for InvalidOperationException")]
+ [Property("SPEC", "Tizen.Uix.InputMethod.InputMethodEditor.SendPrivateCommand M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]
+ public void SendPrivateCommand_CHECK_EXCEPTION()
+ {
+ /*
+ * TEST CODE
+ */
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: SendPrivateCommand_CHECK_EXCEPTION");
+ Assert.Throws<InvalidOperationException>(() => InputMethodEditor.SendPrivateCommand(null));
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: SendPrivateCommand_CHECK_EXCEPTION");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check the working of CommitContent method for No Exception")]
+ [Property("SPEC", "Tizen.Uix.InputMethod.InputMethodEditor.CommitContent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]
+ public void CommitContent_NO_EXCEPTION()
+ {
+ /*
+ * TEST CODE
+ */
+ flag = false;
+ try
+ {
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: CommitContent_NO_EXCEPTION");
+ InputMethodEditor.CommitContent("Test1", "Test2", "Test3");
+ flag = true;
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: CommitContent_NO_EXCEPTION");
+ }
+ catch (Exception e)
+ {
+ Helper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
+ Assert.IsTrue(false, "Caught Exception" + e.ToString());
+ }
+ Assert.IsTrue(flag, "Failed test");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check the working of CommitContent method for InvalidOperationException")]
+ [Property("SPEC", "Tizen.Uix.InputMethod.InputMethodEditor.CommitContent M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]
+ public void CommitContent_CHECK_EXCEPTION()
+ {
+ /*
+ * TEST CODE
+ */
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: CommitContent_CHECK_EXCEPTION");
+ Assert.Throws<InvalidOperationException>(() => InputMethodEditor.CommitContent("Test1", null, "Test3"));
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: CommitContent_CHECK_EXCEPTION");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Initialize the BoolAction delegate")]
[Property("SPEC", " Tizen.Uix.InputMethod.InputMethodEditor.BoolAction M")]
[Property("SPEC_URL", "-")]
--- /dev/null
+using System;\r
+using NUnit.Framework;\r
+using System.Runtime.InteropServices;\r
+\r
+namespace Tizen.Uix.InputMethod.Tests\r
+{\r
+ [TestFixture]\r
+ [Description("Tizen.Uix.InputMethod.MimeTypeUpdateRequestedEventArgs test")]\r
+ public class TSMimeTypeUpdateRequestedEventArgsTests\r
+ {\r
+ private string _mimeType = "test";\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Init");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Destroy");\r
+ GC.Collect();\r
+ }\r
+\r
+ private void InputMethodEditor_MimeTypeUpdateRequested(object sender, MimeTypeUpdateRequestedEventArgs e)\r
+ {\r
+ _mimeType = e.MimeType;\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check the MimeType property read only")]\r
+ [Property("SPEC", " Tizen.Uix.InputMethod.MimeTypeUpdateRequestedEventArgs.MimeType A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
+ public void MimeType_READ_ONLY()\r
+ {\r
+ /*\r
+ * TEST CODE\r
+ */\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: MimeType_READ_ONLY");\r
+ InputMethodEditor.MimeTypeUpdateRequested += InputMethodEditor_MimeTypeUpdateRequested;\r
+ Assert.AreEqual(_mimeType, "test", "Failed to retrieve MimeType");\r
+ InputMethodEditor.MimeTypeUpdateRequested -= InputMethodEditor_MimeTypeUpdateRequested;\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: MimeType_READ_ONLY");\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using NUnit.Framework;\r
+using System.Runtime.InteropServices;\r
+\r
+namespace Tizen.Uix.InputMethod.Tests\r
+{\r
+ [TestFixture]\r
+ [Description("Tizen.Uix.InputMethod.PredictionHintDataUpdatedEventArgs test")]\r
+ public class TSPredictionHintDataUpdatedEventArgsTests\r
+ {\r
+ private string _key = "test";\r
+ private string _value = "test";\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Init");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Destroy");\r
+ GC.Collect();\r
+ }\r
+\r
+ private void InputMethodEditor_PredictionHintDataUpdated(object sender, PredictionHintDataUpdatedEventArgs e)\r
+ {\r
+ _key = e.Key;\r
+ _value = e.Value;\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check the Key property read only")]\r
+ [Property("SPEC", " Tizen.Uix.InputMethod.PredictionHintDataUpdatedEventArgs.Key A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
+ public void Key_READ_ONLY()\r
+ {\r
+ /*\r
+ * TEST CODE\r
+ */\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: Key_READ_ONLY");\r
+ InputMethodEditor.PredictionHintDataUpdated += InputMethodEditor_PredictionHintDataUpdated;\r
+ Assert.AreEqual(_key, "test", "Failed to retrieve Key");\r
+ InputMethodEditor.PredictionHintDataUpdated -= InputMethodEditor_PredictionHintDataUpdated;\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: Key_READ_ONLY");\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check the Value property read only")]\r
+ [Property("SPEC", " Tizen.Uix.InputMethod.PredictionHintDataUpdatedEventArgs.Value A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
+ public void Value_READ_ONLY()\r
+ {\r
+ /*\r
+ * TEST CODE\r
+ */\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: Value_READ_ONLY");\r
+ InputMethodEditor.PredictionHintDataUpdated += InputMethodEditor_PredictionHintDataUpdated;\r
+ Assert.AreEqual(_value, "test", "Failed to retrieve Value");\r
+ InputMethodEditor.PredictionHintDataUpdated -= InputMethodEditor_PredictionHintDataUpdated;\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: Value_READ_ONLY");\r
+ }\r
+ }\r
+}\r
--- /dev/null
+using System;\r
+using NUnit.Framework;\r
+using System.Runtime.InteropServices;\r
+\r
+namespace Tizen.Uix.InputMethod.Tests\r
+{\r
+ [TestFixture]\r
+ [Description("Tizen.Uix.InputMethod.PredictionHintUpdatedEventArgs test")]\r
+ public class TSPredictionHintUpdatedEventArgsTests\r
+ {\r
+ private string _predictionHint = "test";\r
+\r
+ [SetUp]\r
+ public void Init()\r
+ {\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Init");\r
+ }\r
+\r
+ [TearDown]\r
+ public void Destroy()\r
+ {\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Destroy");\r
+ GC.Collect();\r
+ }\r
+\r
+ private void InputMethodEditor_PredictionHintUpdated(object sender, PredictionHintUpdatedEventArgs e)\r
+ {\r
+ _predictionHint = e.PredictionHint;\r
+ }\r
+\r
+ [Test]\r
+ [Category("P1")]\r
+ [Description("Check the PredictionHint property read only")]\r
+ [Property("SPEC", " Tizen.Uix.InputMethod.PredictionHintUpdatedEventArgs.PredictionHint A")]\r
+ [Property("SPEC_URL", "-")]\r
+ [Property("CRITERIA", "PRO")]\r
+ [Property("AUTHOR", "Inhong Han, inhong1.han@samsung.com")]\r
+ public void PredictionHint_READ_ONLY()\r
+ {\r
+ /*\r
+ * TEST CODE\r
+ */\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Executing TC: PredictionHint_READ_ONLY");\r
+ InputMethodEditor.PredictionHintUpdated += InputMethodEditor_PredictionHintUpdated;\r
+ Assert.AreEqual(_predictionHint, "test", "Failed to retrieve PredictionHint");\r
+ InputMethodEditor.PredictionHintUpdated -= InputMethodEditor_PredictionHintUpdated;\r
+ Helper.PrintLog(Type.DLogAndlogUtil, "Completed TC: PredictionHint_READ_ONLY");\r
+ }\r
+ }\r
+}\r