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 ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void DefaultProperties ()
{
HttpListener listener = new HttpListener ();
}
[Test]
- [Category ("RequiresBSDSockets")]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void AddOne ()
{
HttpListener listener = new HttpListener ();
}
[Test]
- [Category ("RequiresBSDSockets")]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Duplicate ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void EndsWithSlash ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void DifferentPath ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void NL_Clear ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void NL_Remove ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void NL_RemoveBadUri ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ArgumentException))]
+#endif
public void NL_AddBadUri ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ArgumentException))]
+#endif
public void NoHostInUrl ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void MultipleSlashes ()
{
// this one throws on Start(), not when adding it.
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void PercentSign ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Disposed1 ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed2 ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed3 ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed4 ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#else
[ExpectedException (typeof (ObjectDisposedException))]
+#endif
public void Disposed5 ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Disposed6 ()
{
HttpListener listener = new HttpListener ();
}
[Test]
+#if FEATURE_NO_BSD_SOCKETS
+ [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
public void Disposed7 ()
{
HttpListener listener = new HttpListener ();