public void CanMatchUsingRouteEvaluator() {
            var routes = new RouteCollection();
            GlobalApplication.RegisterRoutes(routes);

            var evaluator = new RouteEvaluator(routes);
            var matchingRouteData = evaluator.GetMatches("~/foo/bar");
            Assert.True(matchingRouteData.Count > 0);
            matchingRouteData = evaluator.GetMatches("~/foo/bar/baz/quux/yadda/billy");
            Assert.Equal(0, matchingRouteData.Count);
        }
예제 #2
0
        public void CanMatchUsingRouteEvaluator()
        {
            var routes = new RouteCollection();

            GlobalApplication.RegisterRoutes(routes);

            var evaluator         = new RouteEvaluator(routes);
            var matchingRouteData = evaluator.GetMatches("~/foo/bar");

            Assert.True(matchingRouteData.Count > 0);
            matchingRouteData = evaluator.GetMatches("~/foo/bar/baz/quux/yadda/billy");
            Assert.Equal(0, matchingRouteData.Count);
        }