From: Yunmi Ha Date: Mon, 28 Dec 2020 04:43:56 +0000 (+0900) Subject: [Information][NON-ACR] check more feature support X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=960ed402d0fa0c9199b9f24ac8fe46bab1a10866;p=test%2Ftct%2Fcsharp%2Fapi.git [Information][NON-ACR] check more feature support - 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 --- diff --git a/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs b/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs index aa593b2..5d25aba 100755 --- a/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs +++ b/tct-suite-vs/Tizen.Information.Tests/testcase/TSInformation.cs @@ -67,14 +67,26 @@ namespace Tizen.System.Tests { Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: bluetooth")); } - isError = Information.TryGetValue("http://tizen.org/runtimefeature/packetdata", out keyValueBool); - Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: packetdata")); + Information.TryGetValue("http://tizen.org/runtimefeature/packetdata", out supported); + if (supported) + { + isError = Information.TryGetValue("http://tizen.org/runtimefeature/packetdata", out keyValueBool); + Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: packetdata")); + } - isError = Information.TryGetValue("http://tizen.org/runtimefeature/dataroaming", out keyValueBool); - Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: dataroaming")); + Information.TryGetValue("http://tizen.org/runtimefeature/dataroaming", out supported); + if (supported) + { + isError = Information.TryGetValue("http://tizen.org/runtimefeature/dataroaming", out keyValueBool); + Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: dataroaming")); + } - isError = Information.TryGetValue("http://tizen.org/runtimefeature/vibration", out keyValueBool); - Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: vibration")); + Information.TryGetValue("http://tizen.org/runtimefeature/vibration", out supported); + if (supported) + { + isError = Information.TryGetValue("http://tizen.org/runtimefeature/vibration", out keyValueBool); + Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: vibration")); + } 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")); @@ -89,8 +101,12 @@ namespace Tizen.System.Tests { 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")); + Information.TryGetValue("http://tizen.org/runtimefeature/tvout", out supported); + if (supported) + { + isError = Information.TryGetValue("http://tizen.org/runtimefeature/tvout", out keyValueBool); + Assert.IsTrue(isError, string.Format("TryGetValue return false for valid bool key: tvout")); + } Information.TryGetValue("http://tizen.org/feature/screen.auto_rotation", out supported); if (supported)