Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Urban <bernhard.urban@xamarin.com>2017-10-18 16:27:13 +0300
committerBernhard Urban <bernhard.urban@xamarin.com>2017-10-18 20:59:55 +0300
commit7777d78b166f5fe286da650b820ed8a3d8fcc9fd (patch)
tree20b889efe182720ab31dc2cf6a57ab736b6bf24d /mcs/class/System
parent71997d296fbe80baafc98087b92341d6df009c65 (diff)
[System.Net] Tweak tests for watchOS
Diffstat (limited to 'mcs/class/System')
-rwxr-xr-xmcs/class/System/Test/System.Net.Sockets/SocketTest.cs31
-rw-r--r--mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs3
-rw-r--r--mcs/class/System/Test/System.Net/WebClientTest.cs3
-rw-r--r--mcs/class/System/Test/System.Net/WebClientTestAsync.cs3
4 files changed, 40 insertions, 0 deletions
diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
index 5925388413a..a6abbf59745 100755
--- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
+++ b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
@@ -1732,6 +1732,9 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void BeginConnectAddressPortNull ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -1775,7 +1778,11 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof(ObjectDisposedException))]
+#endif
public void BeginConnectAddressPortClosed ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -1906,6 +1913,9 @@ namespace MonoTests.System.Net.Sockets
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void BeginConnectMultipleNull ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -1956,7 +1966,11 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof(ObjectDisposedException))]
+#endif
public void BeginConnectMultipleClosed ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -2245,6 +2259,9 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void ConnectAddressPortNull ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -2287,7 +2304,11 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof(ObjectDisposedException))]
+#endif
public void ConnectAddressPortClosed ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -2396,6 +2417,9 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void ConnectMultipleNull ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -2444,7 +2468,11 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof(ObjectDisposedException))]
+#endif
public void ConnectMultipleClosed ()
{
var port = NetworkHelpers.FindFreePort ();
@@ -3724,6 +3752,9 @@ namespace MonoTests.System.Net.Sockets
// Test case for https://bugzilla.novell.com/show_bug.cgi?id=443346
// See also https://bugzilla.xamarin.com/show_bug.cgi?id=52157
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void ConnectedProperty ()
{
var port = NetworkHelpers.FindFreePort ();
diff --git a/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs b/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs
index 2066cc6a6db..cf366aca2fd 100644
--- a/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs
+++ b/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs
@@ -288,6 +288,9 @@ namespace MonoTests.System.Net
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void HttpRequestIgnoreBadCookies ()
{
var port = NetworkHelpers.FindFreePort ();
diff --git a/mcs/class/System/Test/System.Net/WebClientTest.cs b/mcs/class/System/Test/System.Net/WebClientTest.cs
index 697eb82b6fd..51c3b53296f 100644
--- a/mcs/class/System/Test/System.Net/WebClientTest.cs
+++ b/mcs/class/System/Test/System.Net/WebClientTest.cs
@@ -43,6 +43,9 @@ namespace MonoTests.System.Net
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (WebException))] // Something catches the PlatformNotSupportedException and re-throws an WebException
+#endif
public void DownloadTwice ()
{
WebClient wc = new WebClient();
diff --git a/mcs/class/System/Test/System.Net/WebClientTestAsync.cs b/mcs/class/System/Test/System.Net/WebClientTestAsync.cs
index 205cb90a8dd..7465911bfc5 100644
--- a/mcs/class/System/Test/System.Net/WebClientTestAsync.cs
+++ b/mcs/class/System/Test/System.Net/WebClientTestAsync.cs
@@ -79,6 +79,9 @@ namespace MonoTests.System.Net
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (AggregateException))] // Something catches the PlatformNotSupportedException and re-throws an AggregateException
+#endif
public void DownloadFileTaskAsync ()
{
WebClient wc = new WebClient ();