예제 #1
0
파일: RoutesTests.cs 프로젝트: evkap/DVS
		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");
		}
예제 #2
0
파일: RoutesTests.cs 프로젝트: evkap/DVS
		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");
		}