From: Hyotaek Shim Date: Tue, 3 Dec 2019 02:25:06 +0000 (+0900) Subject: [System][Non-ACR] Modify Tizen.System.Tests.StorageTests.GetAbsolutePath_CHECK_ARGUME... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F219182%2F6;p=test%2Ftct%2Fcsharp%2Fapi.git [System][Non-ACR] Modify Tizen.System.Tests.StorageTests.GetAbsolutePath_CHECK_ARGUMENT_EXCEPTION Change-Id: Idbaf153980aafc015ecf75dc313df2af4aa5433c Signed-off-by: Hyotaek Shim --- diff --git a/tct-suite-vs/Tizen.System.Tests/testcase/TSStorage.cs b/tct-suite-vs/Tizen.System.Tests/testcase/TSStorage.cs index 1b1b1e60f..d7d260391 100644 --- a/tct-suite-vs/Tizen.System.Tests/testcase/TSStorage.cs +++ b/tct-suite-vs/Tizen.System.Tests/testcase/TSStorage.cs @@ -121,17 +121,21 @@ namespace Tizen.System.Tests { if (support) { - Assert.IsNotNull(externalStorage, "PRECONDITION: Failed to get external storage for testing."); - - // TEST CODE - try + if (externalStorage != null) { - externalStorage.GetAbsolutePath(DirectoryType.Ringtones); - Assert.IsTrue(false, "this operation should raise NotSupportedException exception"); + try + { + externalStorage.GetAbsolutePath(DirectoryType.Ringtones); + Assert.IsTrue(false, "this operation should raise NotSupportedException exception"); + } + catch (Exception ex) + { + Assert.IsTrue(ex.GetType() == typeof(ArgumentException), "this operation should raise ArgumentException exception"); + } } - catch (Exception ex) + else { - Assert.IsTrue(ex.GetType() == typeof(ArgumentException), "this operation should raise ArgumentException exception"); + Assert.Pass("Test skipped! The external storage is removed"); } } else