added a failing test for the url matcher on a case i didnt pick up on...might be time to start thinking about regex for this....

This commit is contained in:
TomPallister 2016-10-08 10:01:11 +01:00
parent a7a1143823
commit f8ea87c91b

View File

@ -18,6 +18,16 @@ namespace Ocelot.UnitTests.UrlMatcher
_urlMatcher = new UrlPathToUrlTemplateMatcher(); _urlMatcher = new UrlPathToUrlTemplateMatcher();
} }
[Fact]
public void should_find_match_when_template_smaller_than_valid_path()
{
this.Given(x => x.GivenIHaveAUpstreamPath("/api/products/2354325435624623464235"))
.And(x => x.GivenIHaveAnUpstreamUrlTemplate("/api/products/{productId}"))
.When(x => x.WhenIMatchThePaths())
.And(x => x.ThenTheResultIsTrue())
.BDDfy();
}
[Fact] [Fact]
public void should_not_find_match() public void should_not_find_match()
{ {