public static HttpServerFixture StartServer(string url, Action <HttpListenerRequest, HttpListenerResponse> handle) { var server = new TestHttpServer(0, url, (request, response, _) => handle(request, response)); return(new HttpServerFixture(server)); }
HttpServerFixture(TestHttpServer server) { Url = $"http://localhost:{server.Port}"; _server = server; }