2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mcs / class / System / Test / System.Net / HttpListenerTest.cs
index 73cbf9e422f0a16398a9a4258a44c63f13d75eb8..e1e70864c45c2fdcb9b7427901c318f9a8cd4192 100644 (file)
@@ -166,6 +166,27 @@ namespace MonoTests.System.Net {
                        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 ()
                {