Merge pull request #3591 from directhex/mono_libdir_fallback
[mono.git] / mcs / class / System / Test / System.Net / ServicePointManagerTest.cs
index 6f763923cbfd927440b42f597b707778c5809f0a..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,7 +41,9 @@ 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
@@ -82,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 && !MONODROID\r
+#if MOBILE && !MONODROID\r
                Assert.AreEqual (10, sp.ConnectionLimit, "#2");\r
 #else\r
                Assert.AreEqual (2, sp.ConnectionLimit, "#2");\r