コード例 #1
0
        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));
        }
コード例 #2
0
 HttpServerFixture(TestHttpServer server)
 {
     Url     = $"http://localhost:{server.Port}";
     _server = server;
 }