2009-07-11 Michael Barker <mike@middlesoft.co.uk>
[mono.git] / mcs / class / System.XML / Test / System.Xml / XmlUrlResolverTests.cs
index 35f606c624ae928f606f4fb058487e5159efc58c..31d720ccfbc9256be52519154eac94f960d9429c 100644 (file)
@@ -14,7 +14,7 @@ using NUnit.Framework;
 namespace MonoTests.System.Xml\r
 {\r
        [TestFixture]\r
-       public class XmlUrlResolverTests : Assertion\r
+       public class XmlUrlResolverTests\r
        {\r
                XmlUrlResolver resolver;\r
 \r
@@ -28,7 +28,7 @@ namespace MonoTests.System.Xml
                public void FileUri ()\r
                {\r
                        Uri resolved = resolver.ResolveUri (null, "Test/XmlFiles/xsd/xml.xsd");\r
-                       AssertEquals ("file", resolved.Scheme);\r
+                       Assert.AreEqual ("file", resolved.Scheme);\r
                        Stream s = resolver.GetEntity (resolved, null, typeof (Stream)) as Stream;\r
                }\r
 \r
@@ -36,23 +36,23 @@ namespace MonoTests.System.Xml
                [Category ("NotDotNet")]\r
                public void FileUri2 ()\r
                {\r
-                       AssertEquals ("file://usr/local/src", resolver.ResolveUri (new Uri ("file://usr/local/src"), null).ToString ());\r
+                       Assert.AreEqual (resolver.ResolveUri (new Uri ("file://usr/local/src"), null).ToString (), "file://usr/local/src");\r
                        // MS.NET returns the Uri.ToString() as \r
                        // file://usr/local/src, but it is apparently \r
                        // incorrect in the context of Unix path.\r
-                       AssertEquals ("file:///usr/local/src", resolver.ResolveUri (new Uri ("file:///usr/local/src"), null).ToString ());\r
+                       Assert.AreEqual (resolver.ResolveUri (new Uri ("file:///usr/local/src"), null).ToString (), "file:///usr/local/src");\r
                }\r
 \r
                [Test]\r
                public void HttpUri ()\r
                {\r
-                       AssertEquals ("http://test.xml/", resolver.ResolveUri (null, "http://test.xml").ToString ());\r
+                       Assert.AreEqual (resolver.ResolveUri (null, "http://test.xml").ToString (), "http://test.xml/");\r
                }\r
 \r
                [Test]\r
                public void HttpUri2 ()\r
                {\r
-                       AssertEquals ("http://go-mono.com/", resolver.ResolveUri (new Uri ("http://go-mono.com"), null).ToString ());\r
+                       Assert.AreEqual (resolver.ResolveUri (new Uri ("http://go-mono.com"), null).ToString (), "http://go-mono.com/");\r
                }\r
 \r
                [Test]\r
@@ -63,7 +63,7 @@ namespace MonoTests.System.Xml
                public void ResolveUriWithNullArgs ()\r
                {\r
                        resolver.ResolveUri (null, null);\r
-                       Fail ("Should be error (MS.NET throws ArgumentException here).");\r
+                       Assert.Fail ("Should be error (MS.NET throws ArgumentException here).");\r
                }\r
 \r
 //             [Test] Uncomment if you want to test.\r
@@ -73,12 +73,14 @@ namespace MonoTests.System.Xml
                        resolver.GetEntity (uri, null, null);\r
                }\r
 \r
+#if NET_2_0\r
                [Test]\r
                [ExpectedException (typeof (ArgumentException))]\r
                public void GetEntityWithRelativeFileUri ()\r
                {\r
-                       resolver.GetEntity (new Uri ("file://file.txt"), null, typeof (Stream));\r
+                       resolver.GetEntity (new Uri ("file.txt", UriKind.Relative), null, typeof (Stream));\r
                }\r
+#endif\r
 \r
                [Test]\r
                [ExpectedException (typeof (XmlException))]\r