BloggingSystem.IntegrationTests.InMemoryHttpServer.InMemoryHttpServer C# (CSharp) Method

InMemoryHttpServer() public method

public InMemoryHttpServer ( string baseUrl, IEnumerable routes ) : System
baseUrl string
routes IEnumerable
return System
        public InMemoryHttpServer(string baseUrl, IEnumerable<Route> routes)
        {
            this.routes = routes;
            this.baseUrl = baseUrl;

            var config = new HttpConfiguration();
            this.AddHttpRoutes(config.Routes);
            config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;

            var server = new HttpServer(config);
            this.client = new HttpClient(server);
        }

Same methods

InMemoryHttpServer::InMemoryHttpServer ( string baseUrl ) : System