From: Suyeon Hwang Date: Fri, 6 Mar 2020 08:40:28 +0000 (+0900) Subject: [Uix.Tts][Non-ACR][Unify NotSupportedException checking code] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc33f9dce4cd4f9538f27794c2fd280a3ca9b298;p=test%2Ftct%2Fcsharp%2Fapi.git [Uix.Tts][Non-ACR][Unify NotSupportedException checking code] Change-Id: I889c8617417c70fd69a1deae00f6cdb396777739 Signed-off-by: Suyeon Hwang --- diff --git a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSDefaultVoiceChangedEventArgs.cs b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSDefaultVoiceChangedEventArgs.cs index 8b88db8..48af9f0 100755 --- a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSDefaultVoiceChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSDefaultVoiceChangedEventArgs.cs @@ -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 { diff --git a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSEngineChangedEventArgs.cs b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSEngineChangedEventArgs.cs index 55ba5cf..4ec57b3 100755 --- a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSEngineChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSEngineChangedEventArgs.cs @@ -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"); } diff --git a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSErrorOccurredEventArgs.cs b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSErrorOccurredEventArgs.cs index 56b15e2..3e0a54c 100755 --- a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSErrorOccurredEventArgs.cs +++ b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSErrorOccurredEventArgs.cs @@ -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()); + } } } } diff --git a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSTtsClient.cs b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSTtsClient.cs index 3dea369..16bd2f1 100755 --- a/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSTtsClient.cs +++ b/tct-suite-vs/Tizen.Tts.Manual.Tests/testcase/TSTtsClient.cs @@ -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 { diff --git a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSpeedRange.cs b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSpeedRange.cs index 527c128..f18721a 100755 --- a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSpeedRange.cs +++ b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSpeedRange.cs @@ -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()); + } } } } diff --git a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSStateChangedEventArgs.cs b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSStateChangedEventArgs.cs index 0e018fa..5585e16 100755 --- a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSStateChangedEventArgs.cs +++ b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSStateChangedEventArgs.cs @@ -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 { diff --git a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSupportedVoice.cs b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSupportedVoice.cs index 3af8617..6337030 100755 --- a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSupportedVoice.cs +++ b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSSupportedVoice.cs @@ -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()); + } } } } diff --git a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs index 365c4bb..534f7d2 100755 --- a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs +++ b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSTtsClient.cs @@ -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()); + } } } } diff --git a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSUtteranceEventArgs.cs b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSUtteranceEventArgs.cs index d8ec16c..0ebc363 100755 --- a/tct-suite-vs/Tizen.Tts.Tests/testcase/TSUtteranceEventArgs.cs +++ b/tct-suite-vs/Tizen.Tts.Tests/testcase/TSUtteranceEventArgs.cs @@ -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 {