From 15e3b5072cc6f38bc2c704799aa62c4f5bc7e319 Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Thu, 20 Feb 2020 17:55:54 +0900 Subject: [PATCH] [Tizen.Uix.Tts][Non-ACR][Add assert code for check SetCredential method behavior] Change-Id: I189b743a937ff6699b57d5807c8177addf6e3d82 Signed-off-by: Suyeon Hwang --- .../Tizen.Tts.Tests/testcase/TSTtsClient.cs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs index 679200f..365c4bb 100755 --- a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs +++ b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs @@ -242,15 +242,24 @@ namespace Tizen.Uix.Tts.Tests [Property("AUTHOR", "Manish Rathod, manish.r@samsung.com")] public void SetCredential_NO_EXCEPTION() { - /* - * TEST CODE - */ - TtsHelper.PrintLog(Type.DLogAndlogUtil, "Executing TC:SetCredential_NO_EXCEPTION"); - if (_featureSupported) + try { + /* + * TEST CODE + */ + TtsHelper.PrintLog(Type.DLogAndlogUtil, "Executing TC:SetCredential_NO_EXCEPTION"); TtsHelper.TtsInst.SetCredential("Credential"); + TtsHelper.PrintLog(Type.DLogAndlogUtil, "Completed TC:SetCredential_NO_EXCEPTION"); + } + catch (Exception e) + { + TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception :" + e.ToString()); + if (e is NotSupportedException) { + Assert.IsFalse(_featureSupported, "Invalid NotSupportedException"); + } else { + Assert.IsTrue(false, "Caught Exception" + e.ToString()); + } } - TtsHelper.PrintLog(Type.DLogAndlogUtil, "Completed TC:SetCredential_NO_EXCEPTION"); } [Test] -- 2.7.4