public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseCors("CorsPolicy"); app.UseDeveloperExceptionPage(); app.UseStatusCodePages(); app.UseStaticFiles(); app.UseSession(); app.UseAuthentication(); app.UseMiddleware <Infrastructure.Middleware.SessionMiddleware>(); app.UseMvc(routes => { RouteMapping.MapRoutes(routes); }); if (env.EnvironmentName != "TEST") { app.UseSportsStore(); } }
public void Web_Http_RouteMapping() { var custom = new RouteMapping("CustomRoute", "/CustomPath", new { controller = "Custom", action = "ActionMethod" }); Assert.IsTrue(custom.ToString() != string.Empty); }