15.6 Defining Custom Segment Variables; UNIT TEST: TESTING CUSTOM SEGMENT VARIABLES

chap15
Jason Zhu 2021-11-23 22:51:24 +11:00
parent e7f13be7d8
commit 0f14a97ae2
1 changed files with 6 additions and 5 deletions

View File

@ -99,11 +99,12 @@ namespace UrlsAndRoutes.Tests
[TestMethod] [TestMethod]
public void TestIncomingRoutes() public void TestIncomingRoutes()
{ {
TestRouteMatch("~/", "Home", "Index"); TestRouteMatch("~/", "Home", "Index", new { id = "DefaultId" });
TestRouteMatch("~/Customer", "Customer", "Index"); TestRouteMatch("~/Customer", "Customer", "index", new { id = "DefaultId" });
TestRouteMatch("~/Customer/List", "Customer", "List"); TestRouteMatch("~/Customer/List", "Customer", "List",
TestRouteFail("~/Customer/List/All"); new { id = "DefaultId" });
TestRouteMatch("~/Shop/Index", "Home", "Index"); TestRouteMatch("~/Customer/List/All", "Customer", "List", new { id = "All" });
TestRouteFail("~/Customer/List/All/Delete");
} }
} }
} }