public void MakeRouteTable() { RouteAssert.UseAssertEngine(new NunitAssertEngine()); routes = new RouteCollection(); var areaRegistration = new SomeAreaAreaRegistration(); AreaRegistrationContext context = new AreaRegistrationContext(areaRegistration.AreaName, routes); areaRegistration.RegisterArea(context); }
public void MakeRouteTable() { RouteAssert.UseAssertEngine(new NunitAssertEngine()); routes = new RouteCollection(); var areaRegistration = new SomeAreaAreaRegistration(); var context = new AreaRegistrationContext(areaRegistration.AreaName, routes); areaRegistration.RegisterArea(context); routes.MapRoute( name: "ActionOnly", url: "{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }); }