public void TestIncomingRoutes() { var routeTestManager = new RouteTestManager(MvcApplication.RegisterRoutes); //check for the URL that we hope to receive routeTestManager.TestRouteMatch("~/Home/Index", "Home", "Index"); // check that the values are being obtained from the segments routeTestManager.TestRouteMatch("~/One/Two", "One", "Two"); // ensure that too many or too few segments fails to match routeTestManager.TestRouteFail("~/Home/Index/Something/Other"); }
public void UserManagementAreaTestRoutes() { var routeTestManager = new RouteTestManager( routes => new UserManagementAreaRegistration().RegisterArea(new AreaRegistrationContext("common area", routes))); //check for the URL that we hope to receive routeTestManager.TestRouteMatch("~/UserManagement/Home/Index", "Home", "Index"); // check that the values are being obtained from the segments routeTestManager.TestRouteMatch("~/UserManagement/One/Two", "One", "Two"); // ensure that too many or too few segments fails to match routeTestManager.TestRouteFail("~/Home/Index/Something"); }