[Information][Auto][Non-ACR] Add assert statements 42/226742/1
authorKichan Kwon <k_c.kwon@samsung.com>
Thu, 5 Mar 2020 05:47:44 +0000 (14:47 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Thu, 5 Mar 2020 05:48:58 +0000 (14:48 +0900)
Change-Id: Icdebd33b8c466718994aa9fba510ec3cb76d3591
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs

index fb140da..aa593b2 100755 (executable)
@@ -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");
             }
         }
     }