public void When_two_args_in_route_expect_all_to_be_present_in_order_to_match()
        {
            var route = new RegexRoute("/<one>/<two>");

            Assert.That(route.HasMatch("/one/two"));
            Assert.That(route.HasMatch("/one"), Is.False);
        }
 public void When_two_args_in_route_expect_all_to_be_present_in_order_to_match()
 {
     var route = new RegexRoute("/<one>/<two>");
     Assert.That(route.HasMatch("/one/two"));
     Assert.That(route.HasMatch("/one"), Is.False);
 }
Example #3
0
        public void When_route_path_same_as_request_path_match_is_successful()
        {
            var route = new RegexRoute("foo/");

            Assert.That(route.HasMatch("foo/"), Is.True);
        }
Example #4
0
        public void When_route_path_contains_regex_and_path_that_matches_regex_match_is_successful()
        {
            var route = new RegexRoute(@"foo/<bar>/");

            Assert.That(route.HasMatch("foo/bar/"), Is.True);
        }
Example #5
0
        public void When_route_path_different_to_request_path_match_is_not_successful()
        {
            var route = new RegexRoute("foo/");

            Assert.That(route.HasMatch("bar/"), Is.False);
        }
Example #6
0
 public void When_route_path_same_as_request_path_match_is_successful()
 {
     var route = new RegexRoute("foo/");
     Assert.That(route.HasMatch("foo/"), Is.True);
 }
Example #7
0
 public void When_route_path_different_to_request_path_match_is_not_successful()
 {
     var route = new RegexRoute("foo/");
     Assert.That(route.HasMatch("bar/"), Is.False);
 }
Example #8
0
 public void When_route_path_contains_regex_and_path_that_matches_regex_match_is_successful()
 {
     var route = new RegexRoute(@"foo/<bar>/");
     Assert.That(route.HasMatch("foo/bar/"), Is.True);
 }