public HttpServerFixture()
        {
            var config = new HttpConfiguration();

            WebApiApplication.Configure(config);
            config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
            config.EnsureInitialized();
            _httpServer = new HttpServer(config);
        }
Exemple #2
0
        /// <summary>
        /// Start in-memory hosting server
        /// </summary>
        /// <returns>HttpServer instance</returns>
        public static HttpServer StartServer()
        {
            HttpConfiguration config = new HttpConfiguration();

            WebApiApplication.Configure(config);
            config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
            var server = new HttpServer(config);

            return(server);
        }