public AdministrationAreaRegistrationTests() { registration = new AdministrationAreaRegistration(); context = new AreaRegistrationContext(registration.AreaName, new RouteCollection()); registration.RegisterArea(context); }
public void SetUp() { routeCollection = new RouteCollection(); areaRegistration = new AdministrationAreaRegistration(); registrationContext = new AreaRegistrationContext(areaRegistration.AreaName, routeCollection); areaRegistration.RegisterArea(registrationContext); }
public void RouteCollectionSetup() { var area5Reg = new AdministrationAreaRegistration(); var area5Context = new AreaRegistrationContext(area5Reg.AreaName, RouteTable.Routes); area5Reg.RegisterArea(area5Context); RouteConfig.RegisterRoutes(RouteTable.Routes); this.routeCollection = RouteTable.Routes; }
public void AdministrationAreaArticlesIndexRouteShouldBeValid() { const string Url = "/Administration/Articles/Index/"; var routeCollection = new RouteCollection(); var areaRegistration = new AdministrationAreaRegistration(); var areaRegistrationContext = new AreaRegistrationContext(areaRegistration.AreaName, routeCollection); areaRegistration.RegisterArea(areaRegistrationContext); RouteAssert.HasRoute(routeCollection, Url, new { area = "Administration", controller = "Articles", action = "Index", }); }