Separate ResponseActions from ClientHttpRequest
Before this commit RequestMatcherClientHttpRequest served both as API to define request expectations, i.e. ResponseActions, as well as the implementation of ClientHttpRequest representing actual requests. DefaultResponseActions replaces this class as a simple holder of expected requests and mock responses. MockRestServiceServer is then responsible to match request expectations and create a mock response. Issue: SPR-11365
This commit is contained in:
@@ -52,10 +52,8 @@ public class MockClientHttpRequestFactoryTests {
|
||||
@Test
|
||||
public void createRequest() throws Exception {
|
||||
URI uri = new URI("/foo");
|
||||
ClientHttpRequest expected = (ClientHttpRequest) this.server.expect(anything());
|
||||
ClientHttpRequest actual = this.factory.createRequest(uri, HttpMethod.GET);
|
||||
|
||||
assertSame(expected, actual);
|
||||
assertEquals(uri, actual.getURI());
|
||||
assertEquals(HttpMethod.GET, actual.getMethod());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user