implemented DnsRefreshTimeout to ServicePointManager and adjusted behavior of Service...
[mono.git] / mcs / class / System / Test / System.Net / ServicePointManagerTest.cs
index 5438ec3a63dc8069c93418f04de8352c8ee4e88b..6f763923cbfd927440b42f597b707778c5809f0a 100644 (file)
@@ -19,7 +19,7 @@ namespace MonoTests.System.Net
 {\r
 \r
 [TestFixture]\r
-public class ServicePointManagerTest : Assertion\r
+public class ServicePointManagerTest\r
 {\r
        private Uri googleUri;\r
        private Uri yahooUri;\r
@@ -43,9 +43,10 @@ public class ServicePointManagerTest : Assertion
        }\r
 \r
         [Test, ExpectedException (typeof (InvalidOperationException))]\r
+               [Category ("InetAccess")]\r
         public void MaxServicePointManagers ()\r
         {\r
-               AssertEquals ("#1", 0, ServicePointManager.MaxServicePoints);\r
+               Assert.AreEqual (0, ServicePointManager.MaxServicePoints, "#1");\r
                \r
                DoWebRequest (googleUri);\r
                Thread.Sleep (100);\r
@@ -85,9 +86,13 @@ public class ServicePointManagerTest : Assertion
        {\r
                ServicePointManager.MaxServicePoints = 0;\r
                ServicePoint sp = ServicePointManager.FindServicePoint (googleUri, new WebProxy (apacheUri));\r
-               AssertEquals ("#1", apacheUri, sp.Address);\r
-               AssertEquals ("#2", 2, sp.ConnectionLimit);\r
-               AssertEquals ("#3", "http", sp.ConnectionName);\r
+               Assert.AreEqual (apacheUri, sp.Address, "#1");\r
+#if NET_2_1 && !MONODROID\r
+               Assert.AreEqual (10, sp.ConnectionLimit, "#2");\r
+#else\r
+               Assert.AreEqual (2, sp.ConnectionLimit, "#2");\r
+#endif\r
+               Assert.AreEqual ("http", sp.ConnectionName, "#3");\r
        }\r
        \r
        private void DoWebRequest (Uri uri)\r