Route arguments are now automatically url decoded by the RouteMatcher. Added a unit test to cover this case. Bumped package version to 1.1.8

This commit is contained in:
2023-02-02 16:14:32 -08:00
parent 023654aba2
commit f8704e425b
3 changed files with 11 additions and 2 deletions

View File

@ -69,6 +69,14 @@ namespace MontoyaTech.Rest.Net.Tests
arguments[1].Should().Be("2");
}
[Fact]
public void SyntaxWithArgumentsUrlEncodedShouldDecode()
{
RouteMatcher.Matches("http://localhost/a/b%20c", "/a/{name}", out string[] arguments).Should().BeTrue();
arguments.Length.Should().Be(1);
arguments[0].Should().Be("b c");
}
[Fact]
public void SyntaxWithWildcardShouldMatch()
{