[System][Non-ACR] Modify Tizen.System.Tests.StorageTests.GetAbsolutePath_CHECK_ARGUME... 82/219182/6
authorHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 3 Dec 2019 02:25:06 +0000 (11:25 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 3 Dec 2019 03:06:19 +0000 (12:06 +0900)
Change-Id: Idbaf153980aafc015ecf75dc313df2af4aa5433c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
tct-suite-vs/Tizen.System.Tests/testcase/TSStorage.cs

index 1b1b1e6..d7d2603 100644 (file)
@@ -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