[ACR-315][NUI][Add InputMethodContext APIs] 75/231975/10
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 27 Apr 2020 05:49:20 +0000 (14:49 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 18 May 2020 09:34:24 +0000 (18:34 +0900)
Change-Id: I5efd1dfee9fa99f10aea3424afd5a3d9dd2cb4d1
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs

index 26699fa..0b322b5 100755 (executable)
@@ -598,6 +598,92 @@ namespace Tizen.NUI.Tests
 
         [Test]
         [Category("P1")]
+        [Description("Test SetMIMEType. Check whether SetMIMEType works or not.")]
+        [Property("SPEC", "Tizen.NUI.InputMethodContext.SetMIMEType M")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Seoyeon Kim, seoyeon2.kim@samsung.com")]
+        public void SetMIMEType_TEST()
+        {
+            var inputMethodContext = new InputMethodContext();
+            try
+            {
+                inputMethodContext.SetMIMEType("text/plain,image/png,image/gif,application/pdf");
+            }
+            catch (Exception e)
+            {
+                tlog.Error(TAG, "Caught Exception" + e.ToString());
+                LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "Caught Exception" + e.ToString());
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test SetInputPanelPosition. Check whether SetInputPanelPosition works or not.")]
+        [Property("SPEC", "Tizen.NUI.InputMethodContext.SetInputPanelPosition M")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Seoyeon Kim, seoyeon2.kim@samsung.com")]
+        public void SetInputPanelPosition_NO_RETURN_VALUE()
+        {
+            var inputMethodContext = new InputMethodContext();
+            try
+            {
+                inputMethodContext.SetInputPanelPosition(100, 100);
+            }
+            catch (Exception e)
+            {
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test SetInputPanelLanguage. Check whether SetInputPanelLanguage works or not.")]
+        [Property("SPEC", "Tizen.NUI.InputMethodContext.SetInputPanelLanguage M")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Seoyeon Kim, seoyeon2.kim@samsung.com")]
+        public void SetInputPanelLanguage_NO_RETURN_VALUE()
+        {
+            var inputMethodContext = new InputMethodContext();
+            InputMethodContext.InputPanelLanguage language = InputMethodContext.InputPanelLanguage.Alphabet;
+            try
+            {
+                inputMethodContext.SetInputPanelLanguage(InputMethodContext.InputPanelLanguage.Automatic);
+                language = inputMethodContext.GetInputPanelLanguage();
+                Assert.AreEqual(InputMethodContext.InputPanelLanguage.Automatic, language, "Should be equal to SetInputPanelLanguage");
+
+                inputMethodContext.SetInputPanelLanguage(InputMethodContext.InputPanelLanguage.Alphabet);
+                language = inputMethodContext.GetInputPanelLanguage();
+                Assert.AreEqual(InputMethodContext.InputPanelLanguage.Alphabet, language, "Should be equal to SetInputPanelLanguage");
+            }
+            catch (Exception e)
+            {
+                Assert.Fail("Caught Exception" + e.ToString());
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test GetInputPanelLanguage. Check whether GetInputPanelLanguage works or not.")]
+        [Property("SPEC", "Tizen.NUI.InputMethodContext.GetInputPanelLanguage M")]
+        [Property("SPEC_URL", " - ")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Seoyeon Kim, seoyeon2.kim@samsung.com")]
+        public void GetInputPanelLanguage_RETURN_VALUE()
+        {
+            var inputMethodContext = new InputMethodContext();
+            if (inputMethodContext)
+            {
+                inputMethodContext.SetInputPanelLanguage(InputMethodContext.InputPanelLanguage.Automatic);
+                Assert.AreEqual(InputMethodContext.InputPanelLanguage.Automatic, inputMethodContext.GetInputPanelLanguage(), "Should be not null");
+            }
+        }
+
+        [Test]
+        [Category("P1")]
         [Description("Check whether Activated event is triggered.")]
         [Property("SPEC", "Tizen.NUI.InputMethodContext.Activated E")]
         [Property("SPEC_URL", " - ")]