projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[System*] Throw a PlatformNotSupported exception when using the networking stack...
[mono.git]
/
mcs
/
class
/
System
/
Test
/
System.Net
/
HttpListenerPrefixCollectionTest.cs
diff --git
a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
index 21589dc6c30914ebe227c22b04a99143a720457e..b09a8180eafd6593fa30a07a9878138a93727de6 100644
(file)
--- a/
mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
+++ b/
mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
@@
-36,6
+36,9
@@
namespace MonoTests.System.Net {
public class HttpListenerPrefixCollectionTest {
// NL -> Not listening -> tests when listener.IsListening == false
[Test]
public class HttpListenerPrefixCollectionTest {
// NL -> Not listening -> tests when listener.IsListening == false
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void NL_DefaultProperties ()
{
HttpListener listener = new HttpListener ();
public void NL_DefaultProperties ()
{
HttpListener listener = new HttpListener ();
@@
-46,6
+49,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void DefaultProperties ()
{
HttpListener listener = new HttpListener ();
public void DefaultProperties ()
{
HttpListener listener = new HttpListener ();
@@
-57,7
+63,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
- [Category ("RequiresBSDSockets")]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void AddOne ()
{
HttpListener listener = new HttpListener ();
public void AddOne ()
{
HttpListener listener = new HttpListener ();
@@
-71,7
+79,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
- [Category ("RequiresBSDSockets")]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Duplicate ()
{
HttpListener listener = new HttpListener ();
public void Duplicate ()
{
HttpListener listener = new HttpListener ();
@@
-86,6
+96,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void EndsWithSlash ()
{
HttpListener listener = new HttpListener ();
public void EndsWithSlash ()
{
HttpListener listener = new HttpListener ();
@@
-93,6
+106,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void DifferentPath ()
{
HttpListener listener = new HttpListener ();
public void DifferentPath ()
{
HttpListener listener = new HttpListener ();
@@
-102,6
+118,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void NL_Clear ()
{
HttpListener listener = new HttpListener ();
public void NL_Clear ()
{
HttpListener listener = new HttpListener ();
@@
-110,6
+129,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void NL_Remove ()
{
HttpListener listener = new HttpListener ();
public void NL_Remove ()
{
HttpListener listener = new HttpListener ();
@@
-118,6
+140,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void NL_RemoveBadUri ()
{
HttpListener listener = new HttpListener ();
public void NL_RemoveBadUri ()
{
HttpListener listener = new HttpListener ();
@@
-126,7
+151,11
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ArgumentException))]
[ExpectedException (typeof (ArgumentException))]
+#endif
public void NL_AddBadUri ()
{
HttpListener listener = new HttpListener ();
public void NL_AddBadUri ()
{
HttpListener listener = new HttpListener ();
@@
-135,7
+164,11
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ArgumentException))]
[ExpectedException (typeof (ArgumentException))]
+#endif
public void NoHostInUrl ()
{
HttpListener listener = new HttpListener ();
public void NoHostInUrl ()
{
HttpListener listener = new HttpListener ();
@@
-143,6
+176,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void MultipleSlashes ()
{
// this one throws on Start(), not when adding it.
public void MultipleSlashes ()
{
// this one throws on Start(), not when adding it.
@@
-156,6
+192,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void PercentSign ()
{
HttpListener listener = new HttpListener ();
public void PercentSign ()
{
HttpListener listener = new HttpListener ();
@@
-169,6
+208,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Disposed1 ()
{
HttpListener listener = new HttpListener ();
public void Disposed1 ()
{
HttpListener listener = new HttpListener ();
@@
-180,7
+222,11
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed2 ()
{
HttpListener listener = new HttpListener ();
public void Disposed2 ()
{
HttpListener listener = new HttpListener ();
@@
-190,7
+236,11
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed3 ()
{
HttpListener listener = new HttpListener ();
public void Disposed3 ()
{
HttpListener listener = new HttpListener ();
@@
-200,7
+250,11
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed4 ()
{
HttpListener listener = new HttpListener ();
public void Disposed4 ()
{
HttpListener listener = new HttpListener ();
@@
-210,7
+264,11
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed5 ()
{
HttpListener listener = new HttpListener ();
public void Disposed5 ()
{
HttpListener listener = new HttpListener ();
@@
-221,6
+279,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Disposed6 ()
{
HttpListener listener = new HttpListener ();
public void Disposed6 ()
{
HttpListener listener = new HttpListener ();
@@
-234,6
+295,9
@@
namespace MonoTests.System.Net {
}
[Test]
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Disposed7 ()
{
HttpListener listener = new HttpListener ();
public void Disposed7 ()
{
HttpListener listener = new HttpListener ();