Merge pull request #3591 from directhex/mono_libdir_fallback
[mono.git] / mcs / class / System / Test / System.Net / ServicePointManagerTest.cs
index 23b8d2b67c10f4dce49a0a80a4a368231a456584..b6808979e4a2d77c8cfce2252e67568d7466a333 100644 (file)
@@ -29,8 +29,10 @@ public class ServicePointManagerTest
        [SetUp]\r
         public void GetReady () \r
        {\r
+#if !FEATURE_NO_BSD_SOCKETS\r
                maxIdle = ServicePointManager.MaxServicePointIdleTime;\r
                ServicePointManager.MaxServicePointIdleTime = 10;\r
+#endif\r
                googleUri = new Uri ("http://www.google.com");\r
                yahooUri = new Uri ("http://www.yahoo.com");\r
                apacheUri = new Uri ("http://www.apache.org");\r
@@ -39,14 +41,13 @@ public class ServicePointManagerTest
        [TearDown]\r
        public void Finish ()\r
        {\r
+#if !FEATURE_NO_BSD_SOCKETS\r
                ServicePointManager.MaxServicePointIdleTime = maxIdle;\r
+#endif\r
        }\r
 \r
         [Test, ExpectedException (typeof (InvalidOperationException))]\r
                [Category ("InetAccess")]\r
-#if TARGET_JVM\r
-       [Ignore ("Unsupported property - ServicePointManager.MaxServicePoints")]\r
-#endif\r
         public void MaxServicePointManagers ()\r
         {\r
                Assert.AreEqual (0, ServicePointManager.MaxServicePoints, "#1");\r
@@ -85,12 +86,15 @@ public class ServicePointManagerTest
        }\r
        \r
         [Test]\r
+#if FEATURE_NO_BSD_SOCKETS\r
+       [ExpectedException (typeof (PlatformNotSupportedException))]\r
+#endif\r
        public void FindServicePoint ()\r
        {\r
                ServicePointManager.MaxServicePoints = 0;\r
                ServicePoint sp = ServicePointManager.FindServicePoint (googleUri, new WebProxy (apacheUri));\r
                Assert.AreEqual (apacheUri, sp.Address, "#1");\r
-#if NET_2_1\r
+#if MOBILE && !MONODROID\r
                Assert.AreEqual (10, sp.ConnectionLimit, "#2");\r
 #else\r
                Assert.AreEqual (2, sp.ConnectionLimit, "#2");\r