Sfoglia il codice sorgente

[System] Add new test

Marek Safar 9 anni fa
parent
commit
cf3f3aa8d1
1 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. 11 0
      mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs

+ 11 - 0
mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs

@@ -199,5 +199,16 @@ namespace MonoTests.System.Net.Sockets
 				Assert.Fail ("ConnectMultiRefused #3");
 			}
 		}
+
+		[Test]
+#if FEATURE_NO_BSD_SOCKETS
+		[ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
+		public void ExclusiveAddressUse ()
+		{
+			using (TcpClient client = new TcpClient ()) {
+				client.ExclusiveAddressUse = false;
+			}
+		}
 	}
 }