public static void AssemblyInit(TestContext context) { // Start OWIN testing HTTP server with Web API support TestWebServer = TestServer.Create(appBuilder => { var config = new HttpConfiguration(); WebApiConfig.Register(config); var webAppStartup = new Startup(); webAppStartup.Configuration(appBuilder); appBuilder.UseWebApi(config); }); HttpClient = TestWebServer.HttpClient; }
public static void AssemblyInit(TestContext context) { server = TestServer.Create(appBuilder => { var config = new HttpConfiguration(); WebApiConfig.Register(config); var webAppStartup = new Startup(); webAppStartup.Configuration(appBuilder); appBuilder.UseWebApi(config); }); client = server.HttpClient; Seed(); }
public void Configuration(IAppBuilder app) { var options = new FileServerOptions() { RequestPath = new PathString(""), FileSystem = new PhysicalFileSystem("client"), EnableDefaultFiles = true, EnableDirectoryBrowsing = true }; options.DefaultFilesOptions.DefaultFileNames.Add("index.html"); options.StaticFileOptions.ServeUnknownFileTypes = true; app.UseCors(CorsOptions.AllowAll); app.MapSignalR(); app.UseFileServer(options); var startup = new Startup(); startup.Configuration(app); }
public static void Configuration(IAppBuilder appBuilder) { appBuilder.UseErrorPage(); Startup startup = new Startup(); startup.Configuration(appBuilder); }