public void RouteValuesTest() { var route = new Route("/blog/{title}", () => null, null, null); var match = route.MatchPathToRoute("/blog/hello-world"); Assert.AreEqual(true, match.Success); Assert.AreEqual("hello-world", match.Values["title"]); }
public void Register(string path, object defaults = null, object constraints = null) { var route = new Route(path, () => new TestRouteHandler(), new RouteValueDictionary(defaults), new RouteValueDictionary(constraints)); Add(route); }