[System*] Throw a PlatformNotSupported exception when using the networking stack...
[mono.git] / mcs / class / System / Test / System.Net.Sockets / NetworkStreamTest.cs
index e51f2d9b7d526e14185622f3337904180ebd89a9..0af239d238ccd494056a4fb8476cd8d1e356f1c4 100644 (file)
@@ -16,12 +16,16 @@ using NUnit.Framework;
 namespace MonoTests.System.Net.Sockets
 {
        [TestFixture]
-       [Category ("RequiresBSDSockets")]
        public class NetworkStreamTest
        {
                [Test]
                // See bug #371923
+
+#if FEATURE_NO_BSD_SOCKETS
+               [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
                [ExpectedException(typeof(IOException))]
+#endif
                public void NetworkStreamConnection ()
                {
                        IPEndPoint ipe = new IPEndPoint(Dns.GetHostEntry ("www.google.com").AddressList [0], 80);
@@ -31,6 +35,9 @@ namespace MonoTests.System.Net.Sockets
                }
                
                [Test]
+#if FEATURE_NO_BSD_SOCKETS
+               [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
                public void ReadTimeout ()
                {
                        Socket sock = new Socket (AddressFamily.InterNetwork,