URI variables with MockRestRequestMatchers requestToUriTemplate
Issue: SPR-15819
This commit is contained in:
committed by
Rossen Stoyanchev
parent
181f002ddf
commit
809189be1a
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user