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); }
public void When_route_path_same_as_request_path_match_is_successful() { var route = new RegexRoute("foo/"); Assert.That(route.HasMatch("foo/"), Is.True); }
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); }
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); }
public void When_route_path_same_as_request_path_match_is_successful() { var route = new RegexRoute("foo/"); Assert.That(route.HasMatch("foo/"), Is.True); }
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); }
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); }