[Information][Auto][Non-ACR] Test battery TCs only if supported 07/173707/1
authorKichan Kwon <k_c.kwon@samsung.com>
Fri, 23 Mar 2018 08:36:42 +0000 (17:36 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Fri, 23 Mar 2018 08:39:47 +0000 (17:39 +0900)
Change-Id: I8a408c72200659e9647e7b0db11b020372cd5997
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs

index 6d6b61a..8a373c0 100755 (executable)
@@ -75,15 +75,19 @@ namespace Tizen.System.Tests {
             isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/audiojack.connected", out keyValueBool);
             Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: audiojack.connected"));
 
-            isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/battery.charging", out keyValueBool);
-            Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: battery.charging"));
+            Information.TryGetValue<bool>("http://tizen.org/feature/battery", out supported);
+            if (supported)
+            {\r
+                isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/battery.charging", out keyValueBool);
+                Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: battery.charging"));
+
+                isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/charger", out keyValueBool);
+                Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: charger"));\r
+            }
 
             isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/tvout", out keyValueBool);
             Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: tvout"));
 
-            isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/charger", out keyValueBool);
-            Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: charger"));
-
             isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/autorotation", out keyValueBool);
             Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: autorotation"));