15.6.3 Defining Variable-Length Routes; UNIT TEST: TESTING CATCHALL SEGMENT VARIABLES

chap15
Jason Zhu 2021-11-24 19:12:29 +11:00
parent b9dc70e649
commit e6bcdbe2b4
1 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,10 @@ namespace UrlsAndRoutes.Tests
TestRouteMatch("~/Customer", "Customer", "index"); TestRouteMatch("~/Customer", "Customer", "index");
TestRouteMatch("~/Customer/List", "Customer", "List"); TestRouteMatch("~/Customer/List", "Customer", "List");
TestRouteMatch("~/Customer/List/All", "Customer", "List", new { id = "All" }); TestRouteMatch("~/Customer/List/All", "Customer", "List", new { id = "All" });
TestRouteFail("~/Customer/List/All/Delete"); TestRouteMatch("~/Customer/List/All/Delete", "Customer", "List",
new { id = "All", catchall = "Delete" });
TestRouteMatch("~/Customer/List/All/Delete/Perm", "Customer", "List",
new { id = "All", catchall = "Delete/Param" });
} }
} }
} }