示例#1
0
        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();
            }
        }
示例#2
0
        public void Web_Http_RouteMapping()
        {
            var custom = new RouteMapping("CustomRoute", "/CustomPath", new { controller = "Custom", action = "ActionMethod" });

            Assert.IsTrue(custom.ToString() != string.Empty);
        }