|
|
|
|
@ -71,6 +71,7 @@ import org.springframework.web.util.UriBuilderFactory;
@@ -71,6 +71,7 @@ import org.springframework.web.util.UriBuilderFactory;
|
|
|
|
|
* @author Rossen Stoyanchev |
|
|
|
|
* @author Sam Brannen |
|
|
|
|
* @author Michał Rowicki |
|
|
|
|
* @author Sebastien Deleuze |
|
|
|
|
* @since 5.0 |
|
|
|
|
*/ |
|
|
|
|
class DefaultWebTestClient implements WebTestClient { |
|
|
|
|
@ -506,7 +507,14 @@ class DefaultWebTestClient implements WebTestClient {
@@ -506,7 +507,14 @@ class DefaultWebTestClient implements WebTestClient {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public <T> FluxExchangeResult<T> returnResult(ParameterizedTypeReference<T> elementTypeRef) { |
|
|
|
|
Flux<T> body = this.response.bodyToFlux(elementTypeRef); |
|
|
|
|
Flux<T> body; |
|
|
|
|
if (elementTypeRef.getType().equals(Void.class)) { |
|
|
|
|
this.response.releaseBody().block(); |
|
|
|
|
body = Flux.empty(); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
body = this.response.bodyToFlux(elementTypeRef); |
|
|
|
|
} |
|
|
|
|
return new FluxExchangeResult<>(this.exchangeResult, body); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|