Browse Source

Add test case for SPR-15719

pull/1481/merge
Rossen Stoyanchev 9 years ago
parent
commit
45e714ec13
  1. 11
      spring-test/src/test/java/org/springframework/test/web/client/SimpleRequestExpectationManagerTests.java

11
spring-test/src/test/java/org/springframework/test/web/client/SimpleRequestExpectationManagerTests.java

@ -173,6 +173,17 @@ public class SimpleRequestExpectationManagerTests { @@ -173,6 +173,17 @@ public class SimpleRequestExpectationManagerTests {
this.manager.validateRequest(createRequest(GET, "/bar"));
}
@Test // SPR-15719
public void repeatedRequestsInSequentialOrder() throws Exception {
this.manager.expectRequest(times(2), requestTo("/foo")).andExpect(method(GET)).andRespond(withSuccess());
this.manager.expectRequest(times(2), requestTo("/bar")).andExpect(method(GET)).andRespond(withSuccess());
this.manager.validateRequest(createRequest(GET, "/foo"));
this.manager.validateRequest(createRequest(GET, "/foo"));
this.manager.validateRequest(createRequest(GET, "/bar"));
this.manager.validateRequest(createRequest(GET, "/bar"));
}
private ClientHttpRequest createRequest(HttpMethod method, String url) {
try {

Loading…
Cancel
Save