From: Sangyoon Jang Date: Fri, 1 Sep 2023 00:00:11 +0000 (+0900) Subject: [Non-ACR][Applications.Cion] Skip tests on emulator X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F298110%2F5;p=test%2Ftct%2Fcsharp%2Fapi.git [Non-ACR][Applications.Cion] Skip tests on emulator Change-Id: Ia9ff68ab5e3b2392ae7d8bf8392e5e51981f835d Signed-off-by: Sangyoon Jang --- diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSClientBase.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSClientBase.cs index e5dd892..72fe743 100755 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSClientBase.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSClientBase.cs @@ -75,6 +75,8 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); } [TearDown] diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSConnectionResult.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSConnectionResult.cs index e3e6b79..afe033c 100644 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSConnectionResult.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSConnectionResult.cs @@ -26,6 +26,8 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); } [TearDown] diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSDataPayload.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSDataPayload.cs index ae72f9d..312a0a0 100644 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSDataPayload.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSDataPayload.cs @@ -30,6 +30,9 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); + string data = "Test Data"; _dataPayload = new DataPayload(Encoding.UTF8.GetBytes(data)); } diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSFilePayload.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSFilePayload.cs index fa47008..9af081a 100644 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSFilePayload.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSFilePayload.cs @@ -30,6 +30,9 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); + string path = Application.Current.ApplicationInfo.SharedResourcePath + "/" + _fileName; _filePayload = new FilePayload(path); } diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSGroupBase.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSGroupBase.cs index 9f70a01..548b6a0 100755 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSGroupBase.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSGroupBase.cs @@ -43,6 +43,8 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); } [TearDown] diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayload.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayload.cs index e339dca..4d4f8fd 100644 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayload.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayload.cs @@ -30,6 +30,9 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); + _payloads = new Payload[] { new FilePayload(_fileName), diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayloadAsyncResult.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayloadAsyncResult.cs index 99cb57e..4fef137 100644 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayloadAsyncResult.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPayloadAsyncResult.cs @@ -29,6 +29,9 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); + string data = "PayloadAsyncResultTests"; _dataPayload = new DataPayload(Encoding.UTF8.GetBytes(data)); } diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPeerInfo.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPeerInfo.cs index 0873210..8e98ced 100644 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPeerInfo.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSPeerInfo.cs @@ -26,6 +26,8 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); } [TearDown] diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSSecurityInfo.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSSecurityInfo.cs index 89f4a09..d772f0b 100644 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSSecurityInfo.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSSecurityInfo.cs @@ -27,6 +27,9 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); + _securityInfo = new SecurityInfo(); } diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSServerBase.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSServerBase.cs index 357a05a..ecd7fa7 100755 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSServerBase.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TSServerBase.cs @@ -58,6 +58,8 @@ namespace Tizen.Applications.Cion.Tests [SetUp] public void Init() { + if (TestHelper.IsEmulator()) + Assert.Pass("The cion feature is not supported on emulator"); } [TearDown] diff --git a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestHelper.cs b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestHelper.cs index c1fdacf..8272569 100755 --- a/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestHelper.cs +++ b/tct-suite-vs/Tizen.Applications.Cion.Tests/testcase/TestHelper.cs @@ -58,5 +58,16 @@ namespace Tizen.Applications.Cion.Tests _testServer.Value.Accept(eventArgs.PeerInfo); }; } - } -} + + public static bool IsEmulator() + { + string value; + var result = Tizen.System.Information.TryGetValue("tizen.org/system/model_name", out value); + if (result && value.Equals("Emulator")) + { + return true; + } + return false; + } + } +} \ No newline at end of file