Fixed some bugs within the RouteMatcher to better support wild card and catch all matching. Added unit tests. Bumped package version to 1.2.9
This commit is contained in:
@ -22,12 +22,24 @@ namespace MontoyaTech.Rest.Net.Tests
|
||||
RouteMatcher.Matches("http://localhost/test1/test2", "/**", out _).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SyntaxCatchAllEmptyShouldMatch()
|
||||
{
|
||||
RouteMatcher.Matches("http://localhost/test1", "/test1/**", out _).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SyntaxWithRootWildcardShouldMatch()
|
||||
{
|
||||
RouteMatcher.Matches("http://localhost/test1", "/*", out _).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SyntaxWildCardEmptyShouldMatch()
|
||||
{
|
||||
RouteMatcher.Matches("http://localhost/test1", "/test1/*", out _).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SyntaxWithRootWildcardShouldNotMatch()
|
||||
{
|
||||
|
Reference in New Issue
Block a user