public void ShouldBeAbleToHostAtSameAddressIfPreviousWasDisposed() { var serverFactory = new HttpServerFactory(); var uri = new Uri(String.Format("http://localhost:{0}", PortHelper.FindLocalAvailablePortForTesting())); var server = serverFactory.Get(uri).WithNewContext(uri.AbsoluteUri); server.Start(); server.Dispose(); var httpServer2 = serverFactory.Get(uri).WithNewContext(uri.AbsoluteUri); Assert.DoesNotThrow(httpServer2.Start); }
public static IHttpServer At(Uri uri) { return(_httpServerFactory.Get(uri).WithNewContext(uri.AbsolutePath)); }
public static IHttpServer At(Uri uri) { return(_httpServerFactory.Get(uri).WithNewContext(Guid.Empty)); }