From 68e68c4beed9c18d46cfa244b5e03dcc1c8d4ad0 Mon Sep 17 00:00:00 2001 From: Kichan Kwon Date: Thu, 5 Mar 2020 14:47:44 +0900 Subject: [PATCH] [Information][Auto][Non-ACR] Add assert statements Change-Id: Icdebd33b8c466718994aa9fba510ec3cb76d3591 Signed-off-by: Kichan Kwon --- .../testcase/TSInformation.cs | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs b/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs index fb140da..aa593b2 100755 --- a/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs +++ b/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs @@ -137,7 +137,14 @@ namespace Tizen.System.Tests { [Property("AUTHOR", "Kichan Kwon, k_c.kwon@samsung.com")] public void SetCallback_RETURN_VALUE() { - Information.SetCallback("http://tizen.org/runtimefeature/audiojack.connected", TestCallback); + try + { + Information.SetCallback("http://tizen.org/runtimefeature/audiojack.connected", TestCallback); + } + catch (Exception e) + { + Assert.IsTrue(false, "SetCallback throws exception"); + } } [Test] @@ -170,7 +177,14 @@ namespace Tizen.System.Tests { [Property("AUTHOR", "Kichan Kwon, k_c.kwon@samsung.com")] public void UnsetCallback_RETURN_VALUE() { - Information.UnsetCallback("http://tizen.org/runtimefeature/audiojack.connected", TestCallback); + try + { + Information.UnsetCallback("http://tizen.org/runtimefeature/audiojack.connected", TestCallback); + } + catch (Exception e) + { + Assert.IsTrue(false, "UnsetCallback throws exception"); + } } [Test] @@ -187,9 +201,10 @@ namespace Tizen.System.Tests { Information.UnsetCallback("http://tizen.org/runtimefeature/invalid", TestCallback); Assert.IsTrue(false, "SetCallback should throw exception"); } - catch (ArgumentException) + catch (Exception e) { - + Log.Info("Step", "Caught Exception"); + Assert.IsTrue(e is ArgumentException, "Argument Exception Not Recieved"); } } } -- 2.7.4