Revert Patch 72756 until we review and discuss this publicly
[mono.git] / mcs / class / corlib / Test / System.IO / DirectoryTest.cs
index 30e3edc9edfa2130bb551832a9706822761c4af6..152e4d0e9d5b0d02724895aeab098d3fd82b338a 100644 (file)
@@ -9,19 +9,21 @@
 // TODO: Find out why ArgumentOutOfRange tests does not release directories properly\r
 //\r
 \r
-using NUnit.Framework;\r
-using System.IO;\r
-using System.Text;\r
 using System;\r
+using System.Diagnostics;\r
 using System.Globalization;\r
+using System.IO;\r
+using System.Text;\r
 using System.Threading;\r
-using System.Diagnostics;\r
 \r
-namespace MonoTests.System.IO {\r
+using NUnit.Framework;\r
+\r
+namespace MonoTests.System.IO\r
+{\r
 \r
 [TestFixture]\r
-public class DirectoryTest : Assertion {\r
-       \r
+public class DirectoryTest\r
+{\r
        string TempFolder = Path.Combine (Path.GetTempPath (), "MonoTests.System.IO.Tests");\r
        static readonly char DSC = Path.DirectorySeparatorChar;\r
 \r
@@ -47,21 +49,24 @@ public class DirectoryTest : Assertion {
                DeleteDirectory (path);\r
                try {\r
                        DirectoryInfo info = Directory.CreateDirectory (path);\r
-                       AssertEquals ("test#01", true, info.Exists);\r
-                       AssertEquals ("test#02", ".1", info.Extension);\r
-                       AssertEquals ("test#03", true, info.FullName.EndsWith ("DirectoryTest.Test.1"));\r
-                       AssertEquals ("test#04", "DirectoryTest.Test.1", info.Name);\r
+                       Assert.IsTrue (info.Exists, "#1");\r
+                       Assert.AreEqual (".1", info.Extension, "#2");\r
+                       Assert.IsTrue (info.FullName.EndsWith ("DirectoryTest.Test.1"), "#3");\r
+                       Assert.AreEqual ("DirectoryTest.Test.1", info.Name, "#4");\r
                } finally {\r
-                       DeleteDirectory (path);         \r
+                       DeleteDirectory (path);\r
                }\r
        }\r
        \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
        public void CreateDirectoryNotSupportedException ()\r
        {\r
                DeleteDirectory (":");\r
-               DirectoryInfo info = Directory.CreateDirectory (":");\r
+               try {\r
+                       DirectoryInfo info = Directory.CreateDirectory (":");\r
+                       Assert.Fail ();\r
+               } catch (ArgumentException) {\r
+               }\r
                DeleteDirectory (":");\r
        }\r
 \r
@@ -69,7 +74,7 @@ public class DirectoryTest : Assertion {
        [ExpectedException(typeof(ArgumentNullException))]\r
        public void CreateDirectoryArgumentNullException ()\r
        {\r
-               DirectoryInfo info = Directory.CreateDirectory (null as string);                \r
+               DirectoryInfo info = Directory.CreateDirectory (null as string);\r
        }\r
 \r
        [Test]\r
@@ -83,7 +88,7 @@ public class DirectoryTest : Assertion {
        [ExpectedException(typeof(ArgumentException))]\r
        public void CreateDirectoryArgumentException2 ()\r
        {\r
-               DirectoryInfo info = Directory.CreateDirectory ("            ");                \r
+               DirectoryInfo info = Directory.CreateDirectory ("            ");\r
        }\r
 \r
        [Test]\r
@@ -95,7 +100,7 @@ public class DirectoryTest : Assertion {
                try {\r
                        path += Path.InvalidPathChars [0];\r
                        path += ".2";\r
-                       DirectoryInfo info = Directory.CreateDirectory (path);          \r
+                       DirectoryInfo info = Directory.CreateDirectory (path);\r
                } finally {\r
                        DeleteDirectory (path);\r
                }\r
@@ -110,11 +115,11 @@ public class DirectoryTest : Assertion {
                        DirectoryInfo info1 = Directory.CreateDirectory (path);\r
                        DirectoryInfo info2 = Directory.CreateDirectory (path);\r
 \r
-                       AssertEquals ("test#01", true, info2.Exists);\r
-                       AssertEquals ("test#02", true, info2.FullName.EndsWith ("DirectoryTest.Test.Exists"));\r
-                       AssertEquals ("test#03", "DirectoryTest.Test.Exists", info2.Name);\r
+                       Assert.IsTrue (info2.Exists, "#1");\r
+                       Assert.IsTrue (info2.FullName.EndsWith ("DirectoryTest.Test.Exists"), "#2");\r
+                       Assert.AreEqual ("DirectoryTest.Test.Exists", info2.Name, "#3");\r
                } finally {\r
-                       DeleteDirectory (path);         \r
+                       DeleteDirectory (path);\r
                }\r
        }\r
 \r
@@ -129,11 +134,19 @@ public class DirectoryTest : Assertion {
                        fstream.Close();\r
 \r
                        DirectoryInfo dinfo = Directory.CreateDirectory (path);\r
-                       AssertEquals ("test#01", false, dinfo.Exists);\r
-                       AssertEquals ("test#02", true, dinfo.FullName.EndsWith ("DirectoryTest.Test.ExistsAsFile"));\r
-                       AssertEquals ("test#03", "DirectoryTest.Test.ExistsAsFile", dinfo.Name);\r
+#if NET_2_0\r
+                       Assert.Fail ("#1");\r
+               } catch (IOException ex) {\r
+                       Assert.AreEqual (typeof (IOException), ex.GetType (), "#2");\r
+                       Assert.IsNotNull (ex.Message, "#3");\r
+                       Assert.IsNull (ex.InnerException, "#4");\r
+#else\r
+                       Assert.IsFalse (dinfo.Exists, "#2");\r
+                       Assert.IsTrue (dinfo.FullName.EndsWith ("DirectoryTest.Test.ExistsAsFile"), "#3");\r
+                       Assert.AreEqual ("DirectoryTest.Test.ExistsAsFile", dinfo.Name, "#4");\r
+#endif\r
                } finally {\r
-                       DeleteDirectory (path);         \r
+                       DeleteDirectory (path);\r
                        DeleteFile (path);\r
                }\r
        }\r
@@ -145,27 +158,27 @@ public class DirectoryTest : Assertion {
                DeleteDirectory (path);\r
                try {\r
                        Directory.CreateDirectory (path);\r
-                       AssertEquals ("test#01", true, Directory.Exists (path));\r
+                       Assert.IsTrue (Directory.Exists (path), "#1");\r
                \r
                        Directory.CreateDirectory (path + DSC + "DirectoryTest.Test.Delete.1.2");\r
-                       AssertEquals ("test#02", true, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
+                       Assert.IsTrue (Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"), "#2");\r
                \r
                        Directory.Delete (path + DSC + "DirectoryTest.Test.Delete.1.2");\r
-                       AssertEquals ("test#03", false, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
-                       AssertEquals ("test#04", true, Directory.Exists (path));\r
+                       Assert.IsFalse (Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"), "#3");\r
+                       Assert.IsTrue (Directory.Exists (path), "#4");\r
                \r
                        Directory.Delete (path);\r
-                       AssertEquals ("test#05", false, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
-                       AssertEquals ("test#06", false, Directory.Exists (path));               \r
+                       Assert.IsFalse (Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"), "#5");\r
+                       Assert.IsFalse (Directory.Exists (path), "#6");\r
        \r
                        Directory.CreateDirectory (path);\r
                        Directory.CreateDirectory (path + DSC + "DirectoryTest.Test.Delete.1.2");\r
-                       AssertEquals ("test#07", true, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
-                       AssertEquals ("test#08", true, Directory.Exists (path));\r
+                       Assert.IsTrue (Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"), "#7");\r
+                       Assert.IsTrue (Directory.Exists (path), "#8");\r
                \r
                        Directory.Delete (path, true);\r
-                       AssertEquals ("test#09", false, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
-                       AssertEquals ("test#10", false, Directory.Exists (path));\r
+                       Assert.IsFalse (Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"), "#9");\r
+                       Assert.IsFalse (Directory.Exists (path), "#10");\r
                } finally {\r
                        DeleteDirectory (path);\r
                }\r
@@ -175,14 +188,14 @@ public class DirectoryTest : Assertion {
        [ExpectedException(typeof(ArgumentException))]\r
        public void DeleteArgumentException ()\r
        {\r
-               Directory.Delete ("");          \r
+               Directory.Delete ("");\r
        }\r
 \r
        [Test]  \r
        [ExpectedException(typeof(ArgumentException))]\r
        public void DeleteArgumentException2 ()\r
        {\r
-               Directory.Delete ("     ");             \r
+               Directory.Delete ("     ");\r
        }\r
 \r
        [Test]  \r
@@ -200,7 +213,7 @@ public class DirectoryTest : Assertion {
        [ExpectedException(typeof(ArgumentNullException))]\r
        public void DeleteArgumentNullException ()\r
        {\r
-               Directory.Delete (null as string);              \r
+               Directory.Delete (null as string);\r
        }\r
 \r
        [Test]  \r
@@ -210,7 +223,7 @@ public class DirectoryTest : Assertion {
                string path = TempFolder + DSC + "DirectoryTest.Test.5";\r
                DeleteDirectory (path);\r
                \r
-               Directory.Delete (path);                \r
+               Directory.Delete (path);\r
        }\r
 \r
        [Test]  \r
@@ -227,14 +240,14 @@ public class DirectoryTest : Assertion {
                } finally {\r
                        if (s != null)\r
                                s.Close ();\r
-                       DeleteDirectory (path); \r
+                       DeleteDirectory (path);\r
                };\r
        }\r
 \r
        [Test]\r
        public void Exists ()\r
        {\r
-               AssertEquals ("test#01", false, Directory.Exists (null as string));\r
+               Assert.IsFalse (Directory.Exists (null as string));\r
        }\r
 \r
        [Test]\r
@@ -247,12 +260,11 @@ public class DirectoryTest : Assertion {
                        return; // this test does not work on Windows.\r
 \r
                string path = TempFolder + DSC + "ExistsAccessDenied";\r
-               Process p;\r
 \r
                Directory.CreateDirectory (path);\r
                Process.Start ("/bin/chmod", "000 " + path).WaitForExit ();\r
                try {\r
-                       AssertEquals ("#1", false, Directory.Exists(path + DSC + "b"));\r
+                       Assert.IsFalse (Directory.Exists(path + DSC + "b"));\r
                } finally {\r
                        Process.Start ("/bin/chmod", "755 " + path).WaitForExit ();\r
                        Directory.Delete (path);\r
@@ -260,14 +272,20 @@ public class DirectoryTest : Assertion {
        }\r
        \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
-       public void GetCreationTimeException1 ()\r
+       [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif \r
+    public void GetCreationTimeException1 ()\r
        {\r
                Directory.GetCreationTime (null as string);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetCreationTimeException2 ()\r
        {\r
                Directory.GetCreationTime ("");\r
@@ -276,6 +294,9 @@ public class DirectoryTest : Assertion {
        [Test]\r
 #if !NET_2_0\r
        [ExpectedException(typeof(IOException))]\r
+#endif\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
 #endif\r
        public void GetCreationTimeException_NonExistingPath ()\r
        {\r
@@ -286,12 +307,12 @@ public class DirectoryTest : Assertion {
 \r
 #if NET_2_0\r
                        DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
-                       Assertion.AssertEquals ("#1", expectedTime.Year, time.Year);\r
-                       Assertion.AssertEquals ("#2", expectedTime.Month, time.Month);\r
-                       Assertion.AssertEquals ("#3", expectedTime.Day, time.Day);\r
-                       Assertion.AssertEquals ("#4", expectedTime.Hour, time.Hour);\r
-                       Assertion.AssertEquals ("#5", expectedTime.Second, time.Second);\r
-                       Assertion.AssertEquals ("#6", expectedTime.Millisecond, time.Millisecond);\r
+                       Assert.AreEqual (expectedTime.Year, time.Year, "#1");\r
+                       Assert.AreEqual (expectedTime.Month, time.Month, "#2");\r
+                       Assert.AreEqual (expectedTime.Day, time.Day, "#3");\r
+                       Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");\r
+                       Assert.AreEqual (expectedTime.Second, time.Second, "#5");\r
+                       Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");\r
 #endif\r
                } finally {\r
                        DeleteDirectory (path);\r
@@ -299,28 +320,40 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetCreationTimeException4 ()\r
        {\r
                Directory.GetCreationTime ("    ");\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetCreationTimeException5 ()\r
        {\r
                Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetCreationTimeUtcException1 ()\r
        {\r
                Directory.GetCreationTimeUtc (null as string);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetCreationTimeUtcException2 ()\r
        {\r
                Directory.GetCreationTimeUtc ("");\r
@@ -329,6 +362,9 @@ public class DirectoryTest : Assertion {
        [Test]\r
 #if !NET_2_0\r
        [ExpectedException (typeof (IOException))]\r
+#endif\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
 #endif\r
        public void GetCreationTimeUtc_NonExistingPath ()\r
        {\r
@@ -339,12 +375,12 @@ public class DirectoryTest : Assertion {
                        DateTime time = Directory.GetCreationTimeUtc (path);\r
 \r
 #if NET_2_0\r
-                       Assertion.AssertEquals ("#1", 1601, time.Year);\r
-                       Assertion.AssertEquals ("#2", 1, time.Month);\r
-                       Assertion.AssertEquals ("#3", 1, time.Day);\r
-                       Assertion.AssertEquals ("#4", 0, time.Hour);\r
-                       Assertion.AssertEquals ("#5", 0, time.Second);\r
-                       Assertion.AssertEquals ("#6", 0, time.Millisecond);\r
+                       Assert.AreEqual (1601, time.Year, "#1");\r
+                       Assert.AreEqual (1, time.Month, "#2");\r
+                       Assert.AreEqual (1, time.Day, "#3");\r
+                       Assert.AreEqual (0, time.Hour, "#4");\r
+                       Assert.AreEqual (0, time.Second, "#5");\r
+                       Assert.AreEqual (0, time.Millisecond, "#6");\r
 #endif\r
                } finally {\r
                        DeleteDirectory (path);\r
@@ -352,28 +388,40 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetCreationTimeUtcException4 ()\r
        {\r
                Directory.GetCreationTimeUtc ("    ");\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetCreationTimeUtcException5 ()\r
        {\r
                Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
-       public void GetLastAccessTimeException1 ()\r
+       [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
+       public void GetLastAccessTime_Null ()\r
        {\r
                Directory.GetLastAccessTime (null as string);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetLastAccessTimeException2 ()\r
        {\r
                Directory.GetLastAccessTime ("");\r
@@ -382,6 +430,9 @@ public class DirectoryTest : Assertion {
        [Test]\r
 #if !NET_2_0\r
        [ExpectedException (typeof (IOException))]\r
+#endif\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
 #endif\r
        public void GetLastAccessTime_NonExistingPath ()\r
        {\r
@@ -393,12 +444,12 @@ public class DirectoryTest : Assertion {
 \r
 #if NET_2_0\r
                        DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
-                       Assertion.AssertEquals ("#1", expectedTime.Year, time.Year);\r
-                       Assertion.AssertEquals ("#2", expectedTime.Month, time.Month);\r
-                       Assertion.AssertEquals ("#3", expectedTime.Day, time.Day);\r
-                       Assertion.AssertEquals ("#4", expectedTime.Hour, time.Hour);\r
-                       Assertion.AssertEquals ("#5", expectedTime.Second, time.Second);\r
-                       Assertion.AssertEquals ("#6", expectedTime.Millisecond, time.Millisecond);\r
+                       Assert.AreEqual (expectedTime.Year, time.Year, "#1");\r
+                       Assert.AreEqual (expectedTime.Month, time.Month, "#2");\r
+                       Assert.AreEqual (expectedTime.Day, time.Day, "#3");\r
+                       Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");\r
+                       Assert.AreEqual (expectedTime.Second, time.Second, "#5");\r
+                       Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");\r
 #endif\r
                } finally {\r
                        DeleteDirectory (path);\r
@@ -406,28 +457,40 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetLastAccessTimeException4 ()\r
        {\r
                Directory.GetLastAccessTime ("    ");\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetLastAccessTimeException5 ()\r
        {\r
                Directory.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
-       public void GetLastAccessTimeUtcException1 ()\r
+       [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
+       public void GetLastAccessTimeUtc_Null ()\r
        {\r
                Directory.GetLastAccessTimeUtc (null as string);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetLastAccessTimeUtcException2 ()\r
        {\r
                Directory.GetLastAccessTimeUtc ("");\r
@@ -436,6 +499,9 @@ public class DirectoryTest : Assertion {
        [Test]\r
 #if !NET_2_0\r
        [ExpectedException (typeof (IOException))]\r
+#endif\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
 #endif\r
        public void GetLastAccessTimeUtc_NonExistingPath ()\r
        {\r
@@ -445,12 +511,12 @@ public class DirectoryTest : Assertion {
                        DateTime time = Directory.GetLastAccessTimeUtc (path);\r
 \r
 #if NET_2_0\r
-                       Assertion.AssertEquals ("#1", 1601, time.Year);\r
-                       Assertion.AssertEquals ("#2", 1, time.Month);\r
-                       Assertion.AssertEquals ("#3", 1, time.Day);\r
-                       Assertion.AssertEquals ("#4", 0, time.Hour);\r
-                       Assertion.AssertEquals ("#5", 0, time.Second);\r
-                       Assertion.AssertEquals ("#6", 0, time.Millisecond);\r
+                       Assert.AreEqual (1601, time.Year, "#1");\r
+                       Assert.AreEqual (1, time.Month, "#2");\r
+                       Assert.AreEqual (1, time.Day, "#3");\r
+                       Assert.AreEqual (0, time.Hour, "#4");\r
+                       Assert.AreEqual (0, time.Second, "#5");\r
+                       Assert.AreEqual (0, time.Millisecond, "#6");\r
 #endif\r
                } finally {\r
                        DeleteDirectory (path);\r
@@ -458,28 +524,34 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetLastAccessTimeUtcException4 ()\r
        {\r
                Directory.GetLastAccessTimeUtc ("    ");\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void GetLastAccessTimeUtcException5 ()\r
        {\r
                Directory.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
        public void GetLastWriteTimeException1 ()\r
        {\r
                Directory.GetLastWriteTime (null as string);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void GetLastWriteTimeException2 ()\r
        {\r
                Directory.GetLastWriteTime ("");\r
@@ -498,12 +570,12 @@ public class DirectoryTest : Assertion {
 \r
 #if NET_2_0\r
                        DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
-                       Assertion.AssertEquals ("#1", expectedTime.Year, time.Year);\r
-                       Assertion.AssertEquals ("#2", expectedTime.Month, time.Month);\r
-                       Assertion.AssertEquals ("#3", expectedTime.Day, time.Day);\r
-                       Assertion.AssertEquals ("#4", expectedTime.Hour, time.Hour);\r
-                       Assertion.AssertEquals ("#5", expectedTime.Second, time.Second);\r
-                       Assertion.AssertEquals ("#6", expectedTime.Millisecond, time.Millisecond);\r
+                       Assert.AreEqual (expectedTime.Year, time.Year, "#1");\r
+                       Assert.AreEqual (expectedTime.Month, time.Month, "#2");\r
+                       Assert.AreEqual (expectedTime.Day, time.Day, "#3");\r
+                       Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");\r
+                       Assert.AreEqual (expectedTime.Second, time.Second, "#5");\r
+                       Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");\r
 #endif\r
                } finally {\r
                        DeleteDirectory (path);\r
@@ -511,28 +583,28 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void GetLastWriteTimeException4 ()\r
        {\r
                Directory.GetLastWriteTime ("    ");\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void GetLastWriteTimeException5 ()\r
        {\r
                Directory.GetLastWriteTime (Path.InvalidPathChars [0].ToString ());\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
        public void GetLastWriteTimeUtcException1 ()\r
        {\r
                Directory.GetLastWriteTimeUtc (null as string);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void GetLastWriteTimeUtcException2 ()\r
        {\r
                Directory.GetLastWriteTimeUtc ("");\r
@@ -550,12 +622,12 @@ public class DirectoryTest : Assertion {
                        DateTime time = Directory.GetLastWriteTimeUtc (path);\r
 \r
 #if NET_2_0\r
-                       Assertion.AssertEquals ("#1", 1601, time.Year);\r
-                       Assertion.AssertEquals ("#2", 1, time.Month);\r
-                       Assertion.AssertEquals ("#3", 1, time.Day);\r
-                       Assertion.AssertEquals ("#4", 0, time.Hour);\r
-                       Assertion.AssertEquals ("#5", 0, time.Second);\r
-                       Assertion.AssertEquals ("#6", 0, time.Millisecond);\r
+                       Assert.AreEqual (1601, time.Year, "#1");\r
+                       Assert.AreEqual (1, time.Month, "#2");\r
+                       Assert.AreEqual (1, time.Day, "#3");\r
+                       Assert.AreEqual (0, time.Hour, "#4");\r
+                       Assert.AreEqual (0, time.Second, "#5");\r
+                       Assert.AreEqual (0, time.Millisecond, "#6");\r
 #endif\r
                } finally {\r
                        DeleteDirectory (path);\r
@@ -564,14 +636,14 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void GetLastWriteTimeUtcException4 ()\r
        {\r
                Directory.GetLastWriteTimeUtc ("    ");\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void GetLastWriteTimeUtcException5 ()\r
        {\r
                Directory.GetLastWriteTimeUtc (Path.InvalidPathChars[0].ToString ());\r
@@ -587,17 +659,16 @@ public class DirectoryTest : Assertion {
                try {\r
                        Directory.CreateDirectory (path);\r
                        Directory.CreateDirectory (path + DSC + "dir");\r
-                       AssertEquals ("test#01", true, Directory.Exists (path + DSC + "dir"));\r
+                       Assert.IsTrue (Directory.Exists (path + DSC + "dir"), "#1");\r
                \r
                        Directory.Move (path, path2);\r
-                       AssertEquals ("test#02", false, Directory.Exists (path + DSC + "dir"));         \r
-                       AssertEquals ("test#03", true, Directory.Exists (path2 + DSC + "dir"));\r
-               \r
+                       Assert.IsFalse (Directory.Exists (path + DSC + "dir"), "#2");\r
+                       Assert.IsTrue (Directory.Exists (path2 + DSC + "dir"), "#3");\r
                } finally {\r
                        DeleteDirectory (path);\r
                        DeleteDirectory (path2);\r
                        if (Directory.Exists (path2 + DSC + "dir"))\r
-                               Directory.Delete (path2 + DSC + "dir", true);                   \r
+                               Directory.Delete (path2 + DSC + "dir", true);\r
                }\r
        }\r
        \r
@@ -606,9 +677,9 @@ public class DirectoryTest : Assertion {
        public void MoveException1 ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.Test.8";\r
-               DeleteDirectory (path);         \r
+               DeleteDirectory (path);\r
                try {\r
-                       Directory.Move (path, path);            \r
+                       Directory.Move (path, path);\r
                } finally {\r
                        DeleteDirectory (path);\r
                }\r
@@ -619,9 +690,9 @@ public class DirectoryTest : Assertion {
        public void MoveException2 ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.Test.11";\r
-               DeleteDirectory (path);         \r
+               DeleteDirectory (path);\r
                try {\r
-                       Directory.Move ("", path);              \r
+                       Directory.Move ("", path);\r
                } finally {\r
                        DeleteDirectory (path);\r
                }\r
@@ -632,7 +703,7 @@ public class DirectoryTest : Assertion {
        public void MoveException3 ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.Test.12";\r
-               DeleteDirectory (path);         \r
+               DeleteDirectory (path);\r
                try {\r
                        Directory.Move ("             ", path);\r
                } finally {\r
@@ -647,11 +718,11 @@ public class DirectoryTest : Assertion {
        {\r
                string path = TempFolder + DSC + "DirectoryTest.Test.13";\r
                path += Path.InvalidPathChars [0];\r
-               string path2 = TempFolder + DSC + "DirectoryTest.Test.13";              \r
+               string path2 = TempFolder + DSC + "DirectoryTest.Test.13";\r
                DeleteDirectory (path);\r
                DeleteDirectory (path2);\r
                try {\r
-                       Directory.CreateDirectory (path2);              \r
+                       Directory.CreateDirectory (path2);\r
                        Directory.Move (path2, path);\r
                } finally {\r
                        DeleteDirectory (path);\r
@@ -666,7 +737,7 @@ public class DirectoryTest : Assertion {
                string path = TempFolder + DSC + "DirectoryTest.Test.14";\r
                DeleteDirectory (path);\r
                try {\r
-                       Directory.Move (path, path + "Test.Test");              \r
+                       Directory.Move (path, path + "Test.Test");\r
                } finally {\r
                        DeleteDirectory (path);\r
                        DeleteDirectory (path + "Test.Test");\r
@@ -680,11 +751,11 @@ public class DirectoryTest : Assertion {
                string path = TempFolder + DSC + "DirectoryTest.Test.15";\r
                DeleteDirectory (path);\r
                try {\r
-                       Directory.CreateDirectory (path);               \r
+                       Directory.CreateDirectory (path);\r
                        Directory.Move (path, path + DSC + "dir");\r
                } finally {\r
                        DeleteDirectory (path);\r
-                       DeleteDirectory (path + DSC + "dir");                   \r
+                       DeleteDirectory (path + DSC + "dir");\r
                }\r
        }\r
 \r
@@ -696,21 +767,29 @@ public class DirectoryTest : Assertion {
                string path2 = TempFolder + DSC + "DirectoryTest.Test.17";\r
                \r
                DeleteDirectory (path);\r
-               DeleteDirectory (path2);                \r
+               DeleteDirectory (path2);\r
                try {\r
                        Directory.CreateDirectory (path);\r
                        Directory.CreateDirectory (path2);\r
                        Directory.Move (path, path2);\r
                } finally {\r
                        DeleteDirectory (path);\r
-                       DeleteDirectory (path2);                \r
+                       DeleteDirectory (path2);\r
                }\r
        }\r
        \r
        [Test]\r
-        [Ignore("Unix doesnt support CreationTime")]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void CreationTime ()\r
        {\r
+               // check for Unix platforms - see FAQ for more details\r
+               // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F\r
+               int platform = (int) Environment.OSVersion.Platform;\r
+               if ((platform == 4) || (platform == 128))\r
+                       Assert.Ignore ("Unix doesn't support CreationTime");\r
+\r
                string path = TempFolder + DSC + "DirectoryTest.CreationTime.1";\r
                DeleteDirectory (path);\r
                \r
@@ -718,44 +797,47 @@ public class DirectoryTest : Assertion {
                        Directory.CreateDirectory (path);\r
                        Directory.SetCreationTime (path, new DateTime (2003, 6, 4, 6, 4, 0));\r
 \r
-                       DateTime time = Directory.GetCreationTime (path);               \r
-                       AssertEquals ("test#01", 2003, time.Year);\r
-                       AssertEquals ("test#02", 6, time.Month);\r
-                       AssertEquals ("test#03", 4, time.Day);\r
-                       AssertEquals ("test#04", 6, time.Hour);\r
-                       AssertEquals ("test#05", 4, time.Minute);\r
-                       AssertEquals ("test#06", 0, time.Second);\r
+                       DateTime time = Directory.GetCreationTime (path);\r
+                       Assert.AreEqual (2003, time.Year, "#A1");\r
+                       Assert.AreEqual (6, time.Month, "#A2");\r
+                       Assert.AreEqual (4, time.Day, "#A3");\r
+                       Assert.AreEqual (6, time.Hour, "#A4");\r
+                       Assert.AreEqual (4, time.Minute, "#A5");\r
+                       Assert.AreEqual (0, time.Second, "#A6");\r
                \r
                        time = TimeZone.CurrentTimeZone.ToLocalTime (Directory.GetCreationTimeUtc (path));\r
-                       AssertEquals ("test#07", 2003, time.Year);\r
-                       AssertEquals ("test#08", 6, time.Month);\r
-                       AssertEquals ("test#09", 4, time.Day);\r
-                       AssertEquals ("test#10", 6, time.Hour);\r
-                       AssertEquals ("test#11", 4, time.Minute);\r
-                       AssertEquals ("test#12", 0, time.Second);\r
+                       Assert.AreEqual (2003, time.Year, "#B1");\r
+                       Assert.AreEqual (6, time.Month, "#B2");\r
+                       Assert.AreEqual (4, time.Day, "#B3");\r
+                       Assert.AreEqual (6, time.Hour, "#B4");\r
+                       Assert.AreEqual (4, time.Minute, "#B5");\r
+                       Assert.AreEqual (0, time.Second, "#B6");\r
 \r
                        Directory.SetCreationTimeUtc (path, new DateTime (2003, 6, 4, 6, 4, 0));\r
                        time = TimeZone.CurrentTimeZone.ToUniversalTime (Directory.GetCreationTime (path));\r
-                       AssertEquals ("test#13", 2003, time.Year);\r
-                       AssertEquals ("test#14", 6, time.Month);\r
-                       AssertEquals ("test#15", 4, time.Day);\r
-                       AssertEquals ("test#16", 6, time.Hour);\r
-                       AssertEquals ("test#17", 4, time.Minute);\r
-                       AssertEquals ("test#18", 0, time.Second);\r
-\r
-                       time = Directory.GetCreationTimeUtc (path);             \r
-                       AssertEquals ("test#19", 2003, time.Year);\r
-                       AssertEquals ("test#20", 6, time.Month);\r
-                       AssertEquals ("test#21", 4, time.Day);\r
-                       AssertEquals ("test#22", 6, time.Hour);\r
-                       AssertEquals ("test#23", 4, time.Minute);\r
-                       AssertEquals ("test#24", 0, time.Second);\r
+                       Assert.AreEqual (2003, time.Year, "#C1");\r
+                       Assert.AreEqual (6, time.Month, "#C2");\r
+                       Assert.AreEqual (4, time.Day, "#C3");\r
+                       Assert.AreEqual (6, time.Hour, "#C4");\r
+                       Assert.AreEqual (4, time.Minute, "#C5");\r
+                       Assert.AreEqual (0, time.Second, "#C6");\r
+\r
+                       time = Directory.GetCreationTimeUtc (path);\r
+                       Assert.AreEqual (2003, time.Year, "#D1");\r
+                       Assert.AreEqual (6, time.Month, "#D2");\r
+                       Assert.AreEqual (4, time.Day, "#D3");\r
+                       Assert.AreEqual (6, time.Hour, "#D4");\r
+                       Assert.AreEqual (4, time.Minute, "#D5");\r
+                       Assert.AreEqual (0, time.Second, "#D6");\r
                } finally {\r
-                       DeleteDirectory (path); \r
+                       DeleteDirectory (path);\r
                }\r
        }\r
 \r
        [Test]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void LastAccessTime ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.AccessTime.1";\r
@@ -765,38 +847,38 @@ public class DirectoryTest : Assertion {
                        Directory.CreateDirectory (path);\r
                        Directory.SetLastAccessTime (path, new DateTime (2003, 6, 4, 6, 4, 0));\r
 \r
-                       DateTime time = Directory.GetLastAccessTime (path);             \r
-                       AssertEquals ("test#01", 2003, time.Year);\r
-                       AssertEquals ("test#02", 6, time.Month);\r
-                       AssertEquals ("test#03", 4, time.Day);\r
-                       AssertEquals ("test#04", 6, time.Hour);\r
-                       AssertEquals ("test#05", 4, time.Minute);\r
-                       AssertEquals ("test#06", 0, time.Second);\r
+                       DateTime time = Directory.GetLastAccessTime (path);\r
+                       Assert.AreEqual (2003, time.Year, "#A1");\r
+                       Assert.AreEqual (6, time.Month, "#A2");\r
+                       Assert.AreEqual (4, time.Day, "#A3");\r
+                       Assert.AreEqual (6, time.Hour, "#A4");\r
+                       Assert.AreEqual (4, time.Minute, "#A5");\r
+                       Assert.AreEqual (0, time.Second, "#A6");\r
                \r
                        time = TimeZone.CurrentTimeZone.ToLocalTime (Directory.GetLastAccessTimeUtc (path));\r
-                       AssertEquals ("test#07", 2003, time.Year);\r
-                       AssertEquals ("test#08", 6, time.Month);\r
-                       AssertEquals ("test#09", 4, time.Day);\r
-                       AssertEquals ("test#10", 6, time.Hour);\r
-                       AssertEquals ("test#11", 4, time.Minute);\r
-                       AssertEquals ("test#12", 0, time.Second);\r
+                       Assert.AreEqual (2003, time.Year, "#B1");\r
+                       Assert.AreEqual (6, time.Month, "#B2");\r
+                       Assert.AreEqual (4, time.Day, "#B3");\r
+                       Assert.AreEqual (6, time.Hour, "#B4");\r
+                       Assert.AreEqual (4, time.Minute, "#B5");\r
+                       Assert.AreEqual (0, time.Second, "#B6");\r
 \r
                        Directory.SetLastAccessTimeUtc (path, new DateTime (2003, 6, 4, 6, 4, 0));\r
                        time = TimeZone.CurrentTimeZone.ToUniversalTime (Directory.GetLastAccessTime (path));\r
-                       AssertEquals ("test#13", 2003, time.Year);\r
-                       AssertEquals ("test#14", 6, time.Month);\r
-                       AssertEquals ("test#15", 4, time.Day);\r
-                       AssertEquals ("test#16", 6, time.Hour);\r
-                       AssertEquals ("test#17", 4, time.Minute);\r
-                       AssertEquals ("test#18", 0, time.Second);\r
-\r
-                       time = Directory.GetLastAccessTimeUtc (path);           \r
-                       AssertEquals ("test#19", 2003, time.Year);\r
-                       AssertEquals ("test#20", 6, time.Month);\r
-                       AssertEquals ("test#21", 4, time.Day);\r
-                       AssertEquals ("test#22", 6, time.Hour);\r
-                       AssertEquals ("test#23", 4, time.Minute);\r
-                       AssertEquals ("test#24", 0, time.Second);\r
+                       Assert.AreEqual (2003, time.Year, "#C1");\r
+                       Assert.AreEqual (6, time.Month, "#C2");\r
+                       Assert.AreEqual (4, time.Day, "#C3");\r
+                       Assert.AreEqual (6, time.Hour, "#C4");\r
+                       Assert.AreEqual (4, time.Minute, "#C5");\r
+                       Assert.AreEqual (0, time.Second, "#C6");\r
+\r
+                       time = Directory.GetLastAccessTimeUtc (path);\r
+                       Assert.AreEqual (2003, time.Year, "#D1");\r
+                       Assert.AreEqual (6, time.Month, "#D2");\r
+                       Assert.AreEqual (4, time.Day, "#D3");\r
+                       Assert.AreEqual (6, time.Hour, "#D4");\r
+                       Assert.AreEqual (4, time.Minute, "#D5");\r
+                       Assert.AreEqual (0, time.Second, "#D6");\r
                } finally {\r
                        DeleteDirectory (path);\r
                }\r
@@ -806,51 +888,51 @@ public class DirectoryTest : Assertion {
        public void LastWriteTime ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.WriteTime.1";\r
-               DeleteDirectory (path);         \r
+               DeleteDirectory (path);\r
                \r
                try {\r
                        Directory.CreateDirectory (path);\r
                        Directory.SetLastWriteTime (path, new DateTime (2003, 6, 4, 6, 4, 0));\r
 \r
-                       DateTime time = Directory.GetLastWriteTime (path);              \r
-                       AssertEquals ("test#01", 2003, time.Year);\r
-                       AssertEquals ("test#02", 6, time.Month);\r
-                       AssertEquals ("test#03", 4, time.Day);\r
-                       AssertEquals ("test#04", 6, time.Hour);\r
-                       AssertEquals ("test#05", 4, time.Minute);\r
-                       AssertEquals ("test#06", 0, time.Second);\r
+                       DateTime time = Directory.GetLastWriteTime (path);\r
+                       Assert.AreEqual (2003, time.Year, "#A1");\r
+                       Assert.AreEqual (6, time.Month, "#A2");\r
+                       Assert.AreEqual (4, time.Day, "#A3");\r
+                       Assert.AreEqual (6, time.Hour, "#A4");\r
+                       Assert.AreEqual (4, time.Minute, "#A5");\r
+                       Assert.AreEqual (0, time.Second, "#A6");\r
                \r
                        time = TimeZone.CurrentTimeZone.ToLocalTime (Directory.GetLastWriteTimeUtc (path));\r
-                       AssertEquals ("test#07", 2003, time.Year);\r
-                       AssertEquals ("test#08", 6, time.Month);\r
-                       AssertEquals ("test#09", 4, time.Day);\r
-                       AssertEquals ("test#10", 6, time.Hour);\r
-                       AssertEquals ("test#11", 4, time.Minute);\r
-                       AssertEquals ("test#12", 0, time.Second);\r
+                       Assert.AreEqual (2003, time.Year, "#B1");\r
+                       Assert.AreEqual (6, time.Month, "#B2");\r
+                       Assert.AreEqual (4, time.Day, "#B3");\r
+                       Assert.AreEqual (6, time.Hour, "#B4");\r
+                       Assert.AreEqual (4, time.Minute, "#B5");\r
+                       Assert.AreEqual (0, time.Second, "#B6");\r
 \r
                        Directory.SetLastWriteTimeUtc (path, new DateTime (2003, 6, 4, 6, 4, 0));\r
                        time = TimeZone.CurrentTimeZone.ToUniversalTime (Directory.GetLastWriteTime (path));\r
-                       AssertEquals ("test#13", 2003, time.Year);\r
-                       AssertEquals ("test#14", 6, time.Month);\r
-                       AssertEquals ("test#15", 4, time.Day);\r
-                       AssertEquals ("test#16", 6, time.Hour);\r
-                       AssertEquals ("test#17", 4, time.Minute);\r
-                       AssertEquals ("test#18", 0, time.Second);\r
-\r
-                       time = Directory.GetLastWriteTimeUtc (path);            \r
-                       AssertEquals ("test#19", 2003, time.Year);\r
-                       AssertEquals ("test#20", 6, time.Month);\r
-                       AssertEquals ("test#21", 4, time.Day);\r
-                       AssertEquals ("test#22", 6, time.Hour);\r
-                       AssertEquals ("test#23", 4, time.Minute);\r
-                       AssertEquals ("test#24", 0, time.Second);\r
+                       Assert.AreEqual (2003, time.Year, "#C1");\r
+                       Assert.AreEqual (6, time.Month, "#C2");\r
+                       Assert.AreEqual (4, time.Day, "#C3");\r
+                       Assert.AreEqual (6, time.Hour, "#C4");\r
+                       Assert.AreEqual (4, time.Minute, "#C5");\r
+                       Assert.AreEqual (0, time.Second, "#C6");\r
+\r
+                       time = Directory.GetLastWriteTimeUtc (path);\r
+                       Assert.AreEqual (2003, time.Year, "#D1");\r
+                       Assert.AreEqual (6, time.Month, "#D2");\r
+                       Assert.AreEqual (4, time.Day, "#D3");\r
+                       Assert.AreEqual (6, time.Hour, "#D4");\r
+                       Assert.AreEqual (4, time.Minute, "#D5");\r
+                       Assert.AreEqual (0, time.Second, "#D6");\r
                } finally {\r
-                       DeleteDirectory (path);         \r
+                       DeleteDirectory (path);\r
                }\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
        public void SetLastWriteTimeException1 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -861,7 +943,7 @@ public class DirectoryTest : Assertion {
        [ExpectedException(typeof(ArgumentException))]  \r
        public void SetLastWriteTimeException2 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastWriteTime ("", time);\r
        }\r
        \r
@@ -869,7 +951,7 @@ public class DirectoryTest : Assertion {
        [ExpectedException(typeof(FileNotFoundException))]\r
        public void SetLastWriteTimeException3 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                string path = TempFolder + DSC + "DirectoryTest.SetLastWriteTime.2";\r
                DeleteDirectory (path);\r
                try {\r
@@ -880,30 +962,30 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void SetLastWriteTimeException4 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastWriteTime ("    ", time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void SetLastWriteTimeException5 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastWriteTime (Path.InvalidPathChars [0].ToString (), time);\r
        }\r
 \r
 //     [Test]\r
-//     [ExpectedException(typeof(ArgumentOutOfRangeException))]        \r
+//     [ExpectedException(typeof(ArgumentOutOfRangeException))]\r
 //     public void SetLastWriteTimeException6 ()\r
 //     {\r
 //             DateTime time = new DateTime (1003, 4, 6, 6, 4, 2);\r
 //             string path = TempFolder + Path.DirectorySeparatorChar + "DirectoryTest.SetLastWriteTime.1";\r
 //\r
 //             try {\r
-//                     if (!Directory.Exists (path))                   \r
+//                     if (!Directory.Exists (path))\r
 //                             Directory.CreateDirectory (path);\r
 //             \r
 //                     Directory.SetLastWriteTime (path, time);\r
@@ -914,18 +996,18 @@ public class DirectoryTest : Assertion {
 //     }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
        public void SetLastWriteTimeUtcException1 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastWriteTimeUtc (null as string, time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void SetLastWriteTimeUtcException2 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastWriteTimeUtc ("", time);\r
        }\r
        \r
@@ -933,7 +1015,7 @@ public class DirectoryTest : Assertion {
        [ExpectedException(typeof(FileNotFoundException))]\r
        public void SetLastWriteTimeUtcException3 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                string path = TempFolder + DSC + "DirectoryTest.SetLastWriteTimeUtc.2";\r
                DeleteDirectory (path);\r
                try {\r
@@ -944,23 +1026,23 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void SetLastWriteTimeUtcException4 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastWriteTimeUtc ("    ", time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
        public void SetLastWriteTimeUtcException5 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastWriteTimeUtc (Path.InvalidPathChars [0].ToString (), time);\r
        }\r
 \r
 //     [Test]\r
-//     [ExpectedException(typeof(ArgumentOutOfRangeException))]        \r
+//     [ExpectedException(typeof(ArgumentOutOfRangeException))]\r
 //     public void SetLastWriteTimeUtcException6 ()\r
 //     {\r
 //             DateTime time = new DateTime (1000, 4, 6, 6, 4, 2);\r
@@ -976,7 +1058,10 @@ public class DirectoryTest : Assertion {
 //     }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeException1 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -984,18 +1069,24 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeException2 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastAccessTime ("", time);\r
        }\r
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeException3 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTime.2";\r
                DeleteDirectory (path);\r
                try {\r
@@ -1006,29 +1097,35 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeException4 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastAccessTime ("    ", time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeException5 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastAccessTime (Path.InvalidPathChars [0].ToString (), time);\r
        }\r
 \r
 //     [Test]\r
-//     [ExpectedException(typeof(ArgumentOutOfRangeException))]        \r
+//     [ExpectedException(typeof(ArgumentOutOfRangeException))]\r
 //     public void SetLastAccessTimeException6 ()\r
 //     {\r
 //             DateTime time = new DateTime (1003, 4, 6, 6, 4, 2);\r
 //             string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTime.1";\r
 //\r
-//             if (!Directory.Exists (path))                   \r
+//             if (!Directory.Exists (path))\r
 //                     Directory.CreateDirectory (path);\r
 //             try {\r
 //                     Directory.SetLastAccessTime (path, time);\r
@@ -1039,26 +1136,35 @@ public class DirectoryTest : Assertion {
 //     }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeUtcException1 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastAccessTimeUtc (null as string, time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeUtcException2 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastAccessTimeUtc ("", time);\r
        }\r
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeUtcException3 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTimeUtc.2";\r
                DeleteDirectory (path);\r
                try {\r
@@ -1069,23 +1175,29 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeUtcException4 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastAccessTimeUtc ("    ", time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetLastAccessTimeUtcException5 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString (), time);\r
        }\r
 \r
 //     [Test]\r
-//     [ExpectedException(typeof(ArgumentOutOfRangeException))]        \r
+//     [ExpectedException(typeof(ArgumentOutOfRangeException))]\r
 //     public void SetLastAccessTimeUtcException6 ()\r
 //     {\r
 //             DateTime time = new DateTime (1000, 4, 6, 6, 4, 2);\r
@@ -1102,6 +1214,9 @@ public class DirectoryTest : Assertion {
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeException1 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1109,18 +1224,24 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeException2 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetCreationTime ("", time);\r
        }\r
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeException3 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                string path = TempFolder + DSC + "DirectoryTest.SetCreationTime.2";\r
                DeleteDirectory (path);\r
                \r
@@ -1132,33 +1253,39 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeException4 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetCreationTime ("    ", time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeException5 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetCreationTime (Path.InvalidPathChars [0].ToString (), time);\r
        }\r
 \r
 //     [Test]\r
-//     [ExpectedException(typeof(ArgumentOutOfRangeException))]        \r
+//     [ExpectedException(typeof(ArgumentOutOfRangeException))]\r
 //     public void SetCreationTimeException6 ()\r
 //     {\r
 //             DateTime time = new DateTime (1003, 4, 6, 6, 4, 2);\r
 //             string path = TempFolder + DSC + "DirectoryTest.SetCreationTime.1";\r
 //\r
-//             if (!Directory.Exists (path))                   \r
+//             if (!Directory.Exists (path))\r
 //                     Directory.CreateDirectory (path);\r
 //             try {\r
 //                     Directory.SetCreationTime (path, time);\r
-//                     DeleteDirectory (path);                 \r
+//                     DeleteDirectory (path);\r
 //             } finally {\r
 //                     DeleteDirectory (path);\r
 //             }\r
@@ -1166,26 +1293,35 @@ public class DirectoryTest : Assertion {
 //     }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentNullException))]      \r
+       [ExpectedException(typeof(ArgumentNullException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeUtcException1 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetCreationTimeUtc (null as string, time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeUtcException2 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetCreationTimeUtc ("", time);\r
        }\r
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeUtcException3 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTimeUtc.2";\r
                DeleteDirectory (path);\r
                \r
@@ -1198,23 +1334,29 @@ public class DirectoryTest : Assertion {
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeUtcException4 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetCreationTimeUtc ("    ", time);\r
        }\r
 \r
        [Test]\r
-       [ExpectedException(typeof(ArgumentException))]  \r
+       [ExpectedException(typeof(ArgumentException))]\r
+#if TARGET_JVM\r
+    [Category("NotWorking")]\r
+#endif\r
        public void SetCreationTimeUtcException5 ()\r
        {\r
-               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);             \r
+               DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
                Directory.SetCreationTimeUtc (Path.InvalidPathChars [0].ToString (), time);\r
        }\r
 \r
 //     [Test]\r
-//     [ExpectedException(typeof(ArgumentOutOfRangeException))]        \r
+//     [ExpectedException(typeof(ArgumentOutOfRangeException))]\r
 //     public void SetCreationTimeUtcException6 ()\r
 //     {\r
 //             DateTime time = new DateTime (1000, 4, 6, 6, 4, 2);\r
@@ -1248,7 +1390,7 @@ public class DirectoryTest : Assertion {
                                        return;\r
                        }\r
                \r
-                       Assert ("Directory Not Found", false);\r
+                       Assert.Fail ("Directory Not Found");\r
                } finally {\r
                        DeleteDirectory (DirPath);\r
                }\r
@@ -1260,7 +1402,7 @@ public class DirectoryTest : Assertion {
                DirectoryInfo info;\r
 \r
                info = Directory.GetParent (Path.GetPathRoot (Path.GetTempPath ()));\r
-               AssertEquals (null, info);\r
+               Assert.IsNull (info);\r
        }\r
        \r
        [Test]\r
@@ -1280,12 +1422,11 @@ public class DirectoryTest : Assertion {
                                        return;\r
                        }\r
                \r
-                       Assert ("File Not Found", false);\r
+                       Assert.Fail ("File Not Found");\r
                } finally {\r
                        if (File.Exists (DirPath))\r
                                File.Delete (DirPath);\r
-                       \r
-               }                                                               \r
+               }\r
        }\r
 \r
        [Test]\r
@@ -1317,7 +1458,6 @@ public class DirectoryTest : Assertion {
                dir.GetFiles ("*.nonext");\r
        }\r
 \r
-\r
        [Test]\r
        public void FilenameOnly () // bug 78209\r
        {\r
@@ -1327,7 +1467,7 @@ public class DirectoryTest : Assertion {
        private void DeleteDirectory (string path)\r
        {\r
                if (Directory.Exists (path))\r
-                       Directory.Delete (path, true);          \r
+                       Directory.Delete (path, true);\r
        }\r
 \r
        private void DeleteFile (string path)\r