From bef6dedfe106efde42bf970b8deb95147c524fe4 Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Fri, 18 May 2018 20:31:48 +0900 Subject: [PATCH] [STT][Non-ACR][Fixed logic for STT not support] Signed-off-by: sungrae jo Change-Id: I648994034b902db5bb5a5ca654079c4381ec65a6 --- .../Tizen.Stt.Manual.Tests/support/SttWrapper.cs | 6 +- .../testcase/TSStateChangedEventArgs.cs | 16 +- .../Tizen.Stt.Tests/testcase/TSSttClient.cs | 220 +++++++-------------- .../Tizen.Stt.Tests/testcase/TSSupportedEngine.cs | 4 +- 4 files changed, 85 insertions(+), 161 deletions(-) mode change 100755 => 100644 tct-suite-vs/Tizen.Stt.Tests/testcase/TSStateChangedEventArgs.cs mode change 100755 => 100644 tct-suite-vs/Tizen.Stt.Tests/testcase/TSSttClient.cs mode change 100755 => 100644 tct-suite-vs/Tizen.Stt.Tests/testcase/TSSupportedEngine.cs diff --git a/tct-suite-vs/Tizen.Stt.Manual.Tests/support/SttWrapper.cs b/tct-suite-vs/Tizen.Stt.Manual.Tests/support/SttWrapper.cs index 1d4ea24..69ca26a 100755 --- a/tct-suite-vs/Tizen.Stt.Manual.Tests/support/SttWrapper.cs +++ b/tct-suite-vs/Tizen.Stt.Manual.Tests/support/SttWrapper.cs @@ -53,12 +53,12 @@ namespace Tizen.Uix.Stt.Tests { try { - Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); - Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); + System.Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); + System.Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); isFeatureSupported = isSpeechRecognitionSupported && isMicrophoneSupported; string profile; - Information.TryGetValue("http://tizen.org/feature/profile", out profile); + System.Information.TryGetValue("http://tizen.org/feature/profile", out profile); IsAvailable = "tv".Equals(profile) || "wearable".Equals(profile); SttInst = new Tizen.Uix.Stt.SttClient(); } diff --git a/tct-suite-vs/Tizen.Stt.Tests/testcase/TSStateChangedEventArgs.cs b/tct-suite-vs/Tizen.Stt.Tests/testcase/TSStateChangedEventArgs.cs old mode 100755 new mode 100644 index 8551a72..1587717 --- a/tct-suite-vs/Tizen.Stt.Tests/testcase/TSStateChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Stt.Tests/testcase/TSStateChangedEventArgs.cs @@ -19,8 +19,8 @@ namespace Tizen.Uix.Stt.Tests public static void Init() { SttHelper.PrintLog(Type.DLogAndlogUtil, "Executing Init"); - Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); - Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); + System.Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); + System.Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); isFeatureSupported = isSpeechRecognitionSupported && isMicrophoneSupported; } @@ -57,10 +57,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -123,10 +121,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { diff --git a/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSttClient.cs b/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSttClient.cs old mode 100755 new mode 100644 index a946764..984e749 --- a/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSttClient.cs +++ b/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSttClient.cs @@ -19,8 +19,8 @@ namespace Tizen.Uix.Stt.Tests public static void Init() { SttHelper.PrintLog(Type.DLogAndlogUtil, "Executing Init"); - Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); - Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); + System.Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); + System.Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); isFeatureSupported = isSpeechRecognitionSupported && isMicrophoneSupported; } @@ -60,10 +60,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -112,10 +110,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -165,10 +161,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -220,10 +214,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -287,10 +279,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -359,10 +349,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -418,10 +406,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -470,10 +456,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); /* * TEST CODE @@ -514,10 +498,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -573,10 +555,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -630,10 +610,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -688,10 +666,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -746,10 +722,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -802,10 +776,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(inst, "Failed to create SttWrapper instance"); try { @@ -859,10 +831,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -928,10 +898,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1003,10 +971,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1068,10 +1034,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1148,10 +1112,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1232,10 +1194,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); obj.DoPrepare(); await obj.WaitFlagCond(FlagType.SttStateChanged, 15, Stt.State.Ready); @@ -1290,10 +1250,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); obj.DoPrepare(); await obj.WaitFlagCond(FlagType.SttStateChanged, 15, Stt.State.Ready); @@ -1362,10 +1320,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1441,10 +1397,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1518,10 +1472,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1599,10 +1551,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1650,10 +1600,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1732,10 +1680,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1782,10 +1728,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1863,10 +1807,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1914,10 +1856,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -1993,10 +1933,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -2041,10 +1979,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -2098,10 +2034,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -2177,10 +2111,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -2253,10 +2185,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { @@ -2329,10 +2259,8 @@ namespace Tizen.Uix.Stt.Tests return; } } - finally - { - Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); - } + + Assert.IsNotNull(obj, "Failed to create SttWrapper instance"); try { diff --git a/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSupportedEngine.cs b/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSupportedEngine.cs old mode 100755 new mode 100644 index fca7447..a734774 --- a/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSupportedEngine.cs +++ b/tct-suite-vs/Tizen.Stt.Tests/testcase/TSSupportedEngine.cs @@ -18,8 +18,8 @@ namespace Tizen.Uix.Stt.Tests public static void Init() { SttHelper.PrintLog(Type.DLogAndlogUtil, "Executing Init"); - Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); - Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); + System.Information.TryGetValue("http://tizen.org/feature/speech.recognition", out isSpeechRecognitionSupported); + System.Information.TryGetValue("http://tizen.org/feature/microphone", out isMicrophoneSupported); isFeatureSupported = isSpeechRecognitionSupported && isMicrophoneSupported; } -- 2.7.4