[Information][NON-ACR] check more feature support 63/250463/1
authorYunmi Ha <yunmi.ha@samsung.com>
Mon, 28 Dec 2020 04:43:56 +0000 (13:43 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Mon, 28 Dec 2020 04:43:56 +0000 (13:43 +0900)
- In some cases, if feature is not supported, skip the test.
 (Packet data, Data roaming, Vibration and TV out)

- Related API change:
 https://review.tizen.org/gerrit/#/c/platform/core/api/runtime-info/+/219933/

Change-Id: I143f4840d6f7adf7edbb229a79dff8e724e284de
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs

index aa593b2..5d25aba 100755 (executable)
@@ -67,14 +67,26 @@ namespace Tizen.System.Tests {
                 Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: bluetooth"));\r
             }
 
-            isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/packetdata", out keyValueBool);
-            Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: packetdata"));
+            Information.TryGetValue<bool>("http://tizen.org/runtimefeature/packetdata", out supported);
+            if (supported)
+            {
+                isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/packetdata", out keyValueBool);
+                Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: packetdata"));
+            }
 
-            isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/dataroaming", out keyValueBool);
-            Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: dataroaming"));
+            Information.TryGetValue<bool>("http://tizen.org/runtimefeature/dataroaming", out supported);
+            if (supported)
+            {
+                isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/dataroaming", out keyValueBool);
+                Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: dataroaming"));
+            }
 
-            isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/vibration", out keyValueBool);
-            Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: vibration"));
+            Information.TryGetValue<bool>("http://tizen.org/runtimefeature/vibration", out supported);
+            if (supported)
+            {
+                isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/vibration", out keyValueBool);
+                Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: vibration"));
+            }
 
             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"));
@@ -89,8 +101,12 @@ namespace Tizen.System.Tests {
                 Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: charger"));
             }
 
-            isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/tvout", out keyValueBool);
-            Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: tvout"));
+            Information.TryGetValue<bool>("http://tizen.org/runtimefeature/tvout", out supported);
+            if (supported)
+            {
+                isError = Information.TryGetValue<bool>("http://tizen.org/runtimefeature/tvout", out keyValueBool);
+                Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: tvout"));
+            }
 
             Information.TryGetValue<bool>("http://tizen.org/feature/screen.auto_rotation", out supported);
             if (supported)