URI variables with MockRestRequestMatchers requestToUriTemplate

Issue: SPR-15819
This commit is contained in:
Drummond Dawson
2017-07-24 21:07:47 -04:00
committed by Rossen Stoyanchev
parent 181f002ddf
commit 809189be1a
2 changed files with 19 additions and 0 deletions

View File

@@ -45,6 +45,13 @@ public class MockRestRequestMatchersTests {
MockRestRequestMatchers.requestTo("http://foo.com/bar").match(this.request);
}
@Test // SPR-15819
public void requestToUriTemplate() throws Exception {
this.request.setURI(new URI("http://foo.com/bar"));
MockRestRequestMatchers.requestToUriTemplate("http://foo.com/{bar}", "bar").match(this.request);
}
@Test(expected = AssertionError.class)
public void requestToNoMatch() throws Exception {
this.request.setURI(new URI("http://foo.com/bar"));