[Uix.Tts][Non-ACR][Unify NotSupportedException checking code] 15/226915/2
authorSuyeon Hwang <stom.hwang@samsung.com>
Fri, 6 Mar 2020 08:40:28 +0000 (17:40 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Mon, 9 Mar 2020 01:39:20 +0000 (10:39 +0900)
Change-Id: I889c8617417c70fd69a1deae00f6cdb396777739
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSDefaultVoiceChangedEventArgs.cs
tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSEngineChangedEventArgs.cs
tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSErrorOccurredEventArgs.cs
tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSTtsClient.cs
tct-suite-vs/Tizen.Tts.Tests/testcase/TSSpeedRange.cs
tct-suite-vs/Tizen.Tts.Tests/testcase/TSStateChangedEventArgs.cs
tct-suite-vs/Tizen.Tts.Tests/testcase/TSSupportedVoice.cs
tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs
tct-suite-vs/Tizen.Tts.Tests/testcase/TSUtteranceEventArgs.cs

index 8b88db8..48af9f0 100755 (executable)
@@ -75,11 +75,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -141,11 +142,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
index 55ba5cf..4ec57b3 100755 (executable)
@@ -62,11 +62,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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:EngineId_GET");
         }
@@ -102,11 +103,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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:VoiceType_GET");
         }
@@ -142,11 +144,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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:NeedCredential_GET");
         }
index 56b15e2..3e0a54c 100755 (executable)
@@ -51,11 +51,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -84,11 +85,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -117,11 +119,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
     }
index 3dea369..16bd2f1 100755 (executable)
@@ -65,11 +65,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -130,11 +131,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -193,11 +195,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if (!_featureSupported)
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
index 527c128..f18721a 100755 (executable)
@@ -47,11 +47,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -79,11 +80,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -111,11 +113,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
     }
index 0e018fa..5585e16 100755 (executable)
@@ -60,11 +60,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -118,11 +119,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
index 3af8617..6337030 100755 (executable)
@@ -52,11 +52,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -88,11 +89,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
     }
index 365c4bb..534f7d2 100755 (executable)
@@ -70,11 +70,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -103,11 +104,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -134,11 +136,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -176,11 +179,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -225,11 +229,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -304,11 +309,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -333,11 +339,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -362,11 +369,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -391,11 +399,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -420,11 +429,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -449,11 +459,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -478,11 +489,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -508,11 +520,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -556,11 +569,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -607,11 +621,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -660,11 +675,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -713,11 +729,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -764,11 +781,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -811,11 +829,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -847,11 +866,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -901,11 +921,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -955,11 +976,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -1065,11 +1087,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -1119,11 +1142,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {
@@ -1197,11 +1221,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
 
@@ -1232,11 +1257,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
         }
     }
index d8ec16c..0ebc363 100755 (executable)
@@ -66,11 +66,12 @@ namespace Tizen.Uix.Tts.Tests
             }
             catch (Exception e)
             {
-                TtsHelper.PrintLog(Type.DLogAndlogUtil, "Caught Exception" + e.ToString());
-                if ((!_featureSupported) && (e is NotSupportedException))
-                    Assert.IsTrue(true);
-                else
+                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());
+                }
             }
             finally
             {