|
|
|
@ -21,8 +21,8 @@ import org.junit.jupiter.api.BeforeEach;
|
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
|
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
|
import org.springframework.http.server.reactive.AbstractServerHttpResponse;
|
|
|
|
|
import org.springframework.http.server.reactive.ServerHttpRequest;
|
|
|
|
|
import org.springframework.http.server.reactive.ServerHttpResponse;
|
|
|
|
|
import org.springframework.mock.http.server.reactive.MockServerHttpRequest;
|
|
|
|
|
import org.springframework.mock.web.server.MockServerWebExchange;
|
|
|
|
|
import org.springframework.web.reactive.HandlerMapping;
|
|
|
|
@ -123,9 +123,9 @@ class WebFluxTagsTests {
|
|
|
|
|
void outcomeTagIsSuccessWhenResponseStatusIsAvailableFromUnderlyingServer() {
|
|
|
|
|
ServerWebExchange exchange = mock(ServerWebExchange.class);
|
|
|
|
|
ServerHttpRequest request = mock(ServerHttpRequest.class);
|
|
|
|
|
AbstractServerHttpResponse response = mock(AbstractServerHttpResponse.class);
|
|
|
|
|
ServerHttpResponse response = mock(ServerHttpResponse.class);
|
|
|
|
|
given(response.getStatusCode()).willReturn(HttpStatus.OK);
|
|
|
|
|
given(response.getStatusCodeValue()).willReturn(null);
|
|
|
|
|
given(response.getRawStatusCode()).willReturn(null);
|
|
|
|
|
given(exchange.getRequest()).willReturn(request);
|
|
|
|
|
given(exchange.getResponse()).willReturn(response);
|
|
|
|
|
Tag tag = WebFluxTags.outcome(exchange);
|
|
|
|
|