From 0f14a97ae2a4047fda668ea1f7ce546961cdc601 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Tue, 23 Nov 2021 22:51:24 +1100 Subject: [PATCH] 15.6 Defining Custom Segment Variables; UNIT TEST: TESTING CUSTOM SEGMENT VARIABLES --- UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs b/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs index 097e115..810dfbf 100644 --- a/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs +++ b/UrlsAndRoutes/UrlsAndRoutes.Tests/RouteTests.cs @@ -99,11 +99,12 @@ namespace UrlsAndRoutes.Tests [TestMethod] public void TestIncomingRoutes() { - TestRouteMatch("~/", "Home", "Index"); - TestRouteMatch("~/Customer", "Customer", "Index"); - TestRouteMatch("~/Customer/List", "Customer", "List"); - TestRouteFail("~/Customer/List/All"); - TestRouteMatch("~/Shop/Index", "Home", "Index"); + TestRouteMatch("~/", "Home", "Index", new { id = "DefaultId" }); + TestRouteMatch("~/Customer", "Customer", "index", new { id = "DefaultId" }); + TestRouteMatch("~/Customer/List", "Customer", "List", + new { id = "DefaultId" }); + TestRouteMatch("~/Customer/List/All", "Customer", "List", new { id = "All" }); + TestRouteFail("~/Customer/List/All/Delete"); } } }