From 2e13977c154bb9442bcbe43000f28d009006600a Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Tue, 3 Dec 2019 11:25:06 +0900 Subject: [PATCH] [System][Non-ACR] Modify Tizen.System.Tests.StorageTests.GetAbsolutePath_CHECK_ARGUMENT_EXCEPTION Change-Id: Idbaf153980aafc015ecf75dc313df2af4aa5433c Signed-off-by: Hyotaek Shim --- .../Tizen.System.Tests/testcase/TSStorage.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tct-suite-vs/Tizen.System.Tests/testcase/TSStorage.cs b/tct-suite-vs/Tizen.System.Tests/testcase/TSStorage.cs index 1b1b1e6..d7d2603 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 -- 2.7.4