From 960ed402d0fa0c9199b9f24ac8fe46bab1a10866 Mon Sep 17 00:00:00 2001 From: Yunmi Ha Date: Mon, 28 Dec 2020 13:43:56 +0900 Subject: [PATCH] [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 --- .../testcase/TSInformation.cs | 32 ++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) 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) -- 2.7.4