From 3c3ef111a879774243fb315b40328802df76b51b Mon Sep 17 00:00:00 2001 From: Kichan Kwon Date: Fri, 23 Mar 2018 17:36:42 +0900 Subject: [PATCH] [Information][Auto][Non-ACR] Test battery TCs only if supported Change-Id: I8a408c72200659e9647e7b0db11b020372cd5997 Signed-off-by: Kichan Kwon --- .../Tizen.Information.Tests/testcase/TSInformation.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs b/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs index 6d6b61a..8a373c0 100755 --- a/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs +++ b/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs @@ -75,15 +75,19 @@ namespace Tizen.System.Tests { isError = Information.TryGetValue("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("http://tizen.org/runtimefeature/battery.charging", out keyValueBool); - Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: battery.charging")); + Information.TryGetValue("http://tizen.org/feature/battery", out supported); + if (supported) + { + isError = Information.TryGetValue("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("http://tizen.org/runtimefeature/charger", out keyValueBool); + Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: charger")); + } isError = Information.TryGetValue("http://tizen.org/runtimefeature/tvout", out keyValueBool); Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: tvout")); - isError = Information.TryGetValue("http://tizen.org/runtimefeature/charger", out keyValueBool); - Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: charger")); - isError = Information.TryGetValue("http://tizen.org/runtimefeature/autorotation", out keyValueBool); Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: autorotation")); -- 2.7.4