From e6bcdbe2b49aa87b2a88c03681b76e2ab9bda7c1 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Wed, 24 Nov 2021 19:12:29 +1100 Subject: [PATCH] 15.6.3 Defining Variable-Length Routes; UNIT TEST: TESTING CATCHALL SEGMENT VARIABLES --- UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs b/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs index 8c7d8d7..266406e 100644 --- a/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs +++ b/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs @@ -103,7 +103,10 @@ namespace UrlsAndRoutes.Tests TestRouteMatch("~/Customer", "Customer", "index"); TestRouteMatch("~/Customer/List", "Customer", "List"); 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" }); } } }