|
|
|
|
@ -58,6 +58,9 @@ import static org.springframework.mock.http.server.reactive.test.MockServerHttpR
@@ -58,6 +58,9 @@ import static org.springframework.mock.http.server.reactive.test.MockServerHttpR
|
|
|
|
|
*/ |
|
|
|
|
public class InvocableHandlerMethodTests { |
|
|
|
|
|
|
|
|
|
private static final Duration TIMEOUT = Duration.ofSeconds(5); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final MockServerWebExchange exchange = MockServerWebExchange.from(get("http://localhost:8080/path")); |
|
|
|
|
|
|
|
|
|
private final List<HandlerMethodArgumentResolver> resolvers = new ArrayList<>(); |
|
|
|
|
@ -177,7 +180,7 @@ public class InvocableHandlerMethodTests {
@@ -177,7 +180,7 @@ public class InvocableHandlerMethodTests {
|
|
|
|
|
HandlerResult result = invokeForResult(new TestController(), method); |
|
|
|
|
|
|
|
|
|
assertThat(result).as("Expected no result (i.e. fully handled)").isNull(); |
|
|
|
|
assertThat(this.exchange.getResponse().getBodyAsString().block(Duration.ZERO)).isEqualTo("body"); |
|
|
|
|
assertThat(this.exchange.getResponse().getBodyAsString().block(TIMEOUT)).isEqualTo("body"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@ -197,7 +200,7 @@ public class InvocableHandlerMethodTests {
@@ -197,7 +200,7 @@ public class InvocableHandlerMethodTests {
|
|
|
|
|
HandlerResult result = invokeForResult(new TestController(), method); |
|
|
|
|
|
|
|
|
|
assertThat(result).as("Expected no result (i.e. fully handled)").isNull(); |
|
|
|
|
assertThat(this.exchange.getResponse().getBodyAsString().block(Duration.ZERO)).isEqualTo("body"); |
|
|
|
|
assertThat(this.exchange.getResponse().getBodyAsString().block(TIMEOUT)).isEqualTo("body"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|