15.6.2.1 Using Optional URL Segments to Enforce Separation of Concerns; UNIT TESTING: OPTIONAL URL SEGMENTS

chap15
Jason Zhu 2021-11-24 19:08:15 +11:00
parent e738287bc2
commit 488ab5bfac
1 changed files with 3 additions and 4 deletions

View File

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