namespace MonoTests.System.Net {
[TestFixture]
+#if TARGET_JVM
+ [Ignore ("The class HttpListener is not implemented")]
+#endif
public class HttpListenerTest {
+#if !TARGET_JVM
[Test]
public void DefaultProperties ()
{
listener.Close ();
}
+ [Test]
+ public void StartStopStart ()
+ {
+ HttpListener listener = new HttpListener ();
+ listener.Prefixes.Add ("http://localhost:7777/hola/");
+ listener.Start ();
+ listener.Stop ();
+ listener.Start ();
+ listener.Close ();
+ }
+
+ [Test]
+ public void StartStopDispose ()
+ {
+ using (HttpListener listener = new HttpListener ()){
+ listener.Prefixes.Add ("http://localhost:7777/hola/");
+ listener.Start ();
+ listener.Stop ();
+ }
+ }
+
[Test]
public void AbortBeforeStart ()
{
Event.Close ();
}
}
+#endif
}
}
#endif