Deprecated ClientRequest.method in favor of ClientRequest.create
The former method clashed with the ClientRequest.method() getter.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ import org.springframework.web.reactive.function.client.ExchangeFunction;
|
||||
import org.springframework.web.reactive.function.client.ExchangeFunctions;
|
||||
|
||||
import static java.time.Duration.ofMillis;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link WiretapConnector}.
|
||||
@@ -44,12 +44,12 @@ import static org.junit.Assert.assertEquals;
|
||||
public class WebTestClientConnectorTests {
|
||||
|
||||
@Test
|
||||
public void captureAndClaim() throws Exception {
|
||||
public void captureAndClaim() {
|
||||
ClientHttpRequest request = new MockClientHttpRequest(HttpMethod.GET, "/test");
|
||||
ClientHttpResponse response = new MockClientHttpResponse(HttpStatus.OK);
|
||||
ClientHttpConnector connector = (method, uri, fn) -> fn.apply(request).then(Mono.just(response));
|
||||
|
||||
ClientRequest clientRequest = ClientRequest.method(HttpMethod.GET, URI.create("/test"))
|
||||
ClientRequest clientRequest = ClientRequest.create(HttpMethod.GET, URI.create("/test"))
|
||||
.header(WebTestClient.WEBTESTCLIENT_REQUEST_ID, "1").build();
|
||||
|
||||
WiretapConnector wiretapConnector = new WiretapConnector(connector);
|
||||
|
||||
Reference in New Issue
Block a user