From: Seoyeon Kim Date: Mon, 27 Apr 2020 05:49:20 +0000 (+0900) Subject: [ACR-315][NUI][Add InputMethodContext APIs] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31725e07cbd3ab08626ebe9341f4fb38e205d4ea;p=test%2Ftct%2Fcsharp%2Fapi.git [ACR-315][NUI][Add InputMethodContext APIs] Change-Id: I5efd1dfee9fa99f10aea3424afd5a3d9dd2cb4d1 Signed-off-by: Seoyeon Kim --- diff --git a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs index 26699fa..0b322b5 100755 --- a/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs +++ b/tct-suite-vs/Tizen.NUI.Tests/testcase/TSInputMethodContext.cs @@ -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", " - ")]