[Tizen.Uix.Tts][Non-ACR][Add assert code for check SetCredential method behavior] 01/225501/7
authorSuyeon Hwang <stom.hwang@samsung.com>
Thu, 20 Feb 2020 08:55:54 +0000 (17:55 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 25 Feb 2020 10:45:45 +0000 (19:45 +0900)
Change-Id: I189b743a937ff6699b57d5807c8177addf6e3d82
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs

index 679200f..365c4bb 100755 (executable)
@@ -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]