From cd51f885d65b6f453c6058ae2da2ecce0c7bd803 Mon Sep 17 00:00:00 2001 From: Xie Ligang Date: Fri, 28 Sep 2018 19:24:32 +0800 Subject: [PATCH] [Nlp][TCSACR-187][Upload the TCT for NLP program for the ACR.] Change-Id: I8cc77a4c15a3553595456e00e10920d33b3b4686 Signed-off-by: Xie Ligang --- .../Tizen.Nlp.Tests/testcase/TSLemmatizeResult.cs | 105 --------------------- .../testcase/TSNaturalLanguageProcess.cs | 37 -------- 2 files changed, 142 deletions(-) delete mode 100644 tct-suite-vs/Tizen.Nlp.Tests/testcase/TSLemmatizeResult.cs diff --git a/tct-suite-vs/Tizen.Nlp.Tests/testcase/TSLemmatizeResult.cs b/tct-suite-vs/Tizen.Nlp.Tests/testcase/TSLemmatizeResult.cs deleted file mode 100644 index 295585f..0000000 --- a/tct-suite-vs/Tizen.Nlp.Tests/testcase/TSLemmatizeResult.cs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License - */ - -using NUnit.Framework; -using NUnit.Framework.TUnit; -using System; -using System.Threading; -using System.Threading.Tasks; -using System.Collections.Generic; -using Tizen; -using Tizen.Nlp; -using Tizen.Applications; -using Tizen.Applications.Messages; - -namespace Tizen.Nlp.Tests { - - [TestFixture] - [Description("Tizen.Nlp.LemmatizeResult test")] - public class LemmatizeResultTests - { - static NaturalLanguageProcess nlp = null; - - [SetUp] - public static void Init() - { - nlp = new NaturalLanguageProcess(); - LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Preconditions for each TEST"); - } - - [TearDown] - public static void Destroy() - { - LogUtils.Write(LogUtils.DEBUG , LogUtils.TAG , "Postconditions for each TEST"); - } - - [Test] - [Category("P1")] - [Description("Test: Check if constructor for the class returns correct object instance")] - [Property("SPEC", "Tizen.Nlp.LemmatizeResult.LemmatizeResult C")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "CONSTR")] - [Property("AUTHOR", "Xiaochun wang, xiaochn.wang@samsung.com")] - public static void LemmatizeResult_INIT() - { - /* TEST CODE */ - try - { - LemmatizeResult res = new LemmatizeResult(); - Assert.IsInstanceOf(res, "Expecting LemmatizeResult object"); - } - catch (Exception e) - { - Assert.Fail("Got Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] - [Description("Check the return value of LemmatizeResult Tags is correct or not")] - [Property("SPEC", "Tizen.Nlp.LemmatizeResult.Tags A")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "PRO")] - [Property("AUTHOR", "Xiaochun wang, xiaochn.wang@samsung.com")] - public static async Task Tags_RETURN_VALUE() - { - try - { - /* TEST CODE */ - if (nlp == null) - nlp = new NaturalLanguageProcess(); - try - { - Task task = nlp.Connect(); - await task; - await Task.Delay(100); - } - catch - { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "nlp has connected"); - } - LemmatizeResult res; - string msg = "raining"; - res = await nlp.LemmatizeaAsync(msg); - Assert.IsTrue(res.ActualWord.Equals("rain"), "The return value of tag is correct"); - } - catch (Exception e) - { - Assert.Fail("Got Exception" + e.ToString()); - } - } - } -} diff --git a/tct-suite-vs/Tizen.Nlp.Tests/testcase/TSNaturalLanguageProcess.cs b/tct-suite-vs/Tizen.Nlp.Tests/testcase/TSNaturalLanguageProcess.cs index 2c5bb0e..e07df86 100755 --- a/tct-suite-vs/Tizen.Nlp.Tests/testcase/TSNaturalLanguageProcess.cs +++ b/tct-suite-vs/Tizen.Nlp.Tests/testcase/TSNaturalLanguageProcess.cs @@ -340,43 +340,6 @@ namespace Tizen.Nlp.Tests { [Test] [Category("P1")] - [Description("Check the working of NLP LemmatizeaAsync method for No Exception")] - [Property("SPEC", "Tizen.Nlp.NaturalLanguageProcess.LemmatizeaAsync M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Xiaochun wang, xiaochn.wang@samsung.com")] - public static async Task LemmatizeaAsync_RETURN_VALUE() - { - /* TEST CODE */ - try - { - if (nlp == null) - nlp = new NaturalLanguageProcess(); - try - { - var task = nlp.Connect(); - await task; - await Task.Delay(100); - } - catch - { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, "nlp has connected"); - } - LemmatizeResult res; - string msg = "raining"; - res = await nlp.LemmatizeaAsync(msg); - IList rs_token = new List(); - Assert.IsTrue(res.ActualWord.Equals("rain"), "The return value of tag is correct"); - nlp.Close(); - } - catch (Exception e) - { - Assert.Fail("Got Exception" + e.ToString()); - } - } - - [Test] - [Category("P1")] [Description("Check the working of NLP Close method for No Exception")] [Property("SPEC", "Tizen.Nlp.NaturalLanguageProcess.Close M")] [Property("SPEC_URL", "-")] -- 2.7.4