diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/constraints/ValidatorConstraintResolverTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/constraints/ValidatorConstraintResolverTests.java index 4d134fb5..96b176b0 100644 --- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/constraints/ValidatorConstraintResolverTests.java +++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/constraints/ValidatorConstraintResolverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-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. @@ -27,6 +27,7 @@ import java.util.Map; import java.util.Map.Entry; import javax.validation.Payload; +import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Null; import javax.validation.constraints.Size; @@ -35,7 +36,6 @@ import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.hibernate.validator.constraints.CompositionType; import org.hibernate.validator.constraints.ConstraintComposition; -import org.hibernate.validator.constraints.NotBlank; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; diff --git a/spring-restdocs-webtestclient/src/main/java/org/springframework/restdocs/webtestclient/WebTestClientResponseConverter.java b/spring-restdocs-webtestclient/src/main/java/org/springframework/restdocs/webtestclient/WebTestClientResponseConverter.java index 9251bd19..71669c37 100644 --- a/spring-restdocs-webtestclient/src/main/java/org/springframework/restdocs/webtestclient/WebTestClientResponseConverter.java +++ b/spring-restdocs-webtestclient/src/main/java/org/springframework/restdocs/webtestclient/WebTestClientResponseConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-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. @@ -24,7 +24,6 @@ import org.springframework.restdocs.operation.OperationResponse; import org.springframework.restdocs.operation.OperationResponseFactory; import org.springframework.restdocs.operation.ResponseConverter; import org.springframework.test.web.reactive.server.ExchangeResult; -import org.springframework.util.MultiValueMap; import org.springframework.util.StringUtils; /** @@ -37,8 +36,6 @@ class WebTestClientResponseConverter implements ResponseConverter responseCookies = result - .getResponseCookies(); return new OperationResponseFactory().create(result.getStatus(), extractHeaders(result), result.getResponseBodyContent()); } diff --git a/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationConfigurerTests.java b/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationConfigurerTests.java index 1f4e67b2..9a1bfe7c 100644 --- a/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationConfigurerTests.java +++ b/spring-restdocs-webtestclient/src/test/java/org/springframework/restdocs/webtestclient/WebTestClientRestDocumentationConfigurerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2017 the original author or authors. + * Copyright 2014-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. @@ -52,7 +52,7 @@ public class WebTestClientRestDocumentationConfigurerTests { @Test public void configurationCanBeRetrievedButOnlyOnce() { - ClientRequest request = ClientRequest.method(HttpMethod.GET, URI.create("/test")) + ClientRequest request = ClientRequest.create(HttpMethod.GET, URI.create("/test")) .header(WebTestClient.WEBTESTCLIENT_REQUEST_ID, "1").build(); this.configurer.filter(request, mock(ExchangeFunction.class)); Map configuration = WebTestClientRestDocumentationConfigurer @@ -65,7 +65,7 @@ public class WebTestClientRestDocumentationConfigurerTests { @Test public void requestUriHasDefaultsAppliedWhenItHasNoHost() { ClientRequest request = ClientRequest - .method(HttpMethod.GET, URI.create("/test?foo=bar#baz")) + .create(HttpMethod.GET, URI.create("/test?foo=bar#baz")) .header(WebTestClient.WEBTESTCLIENT_REQUEST_ID, "1").build(); ExchangeFunction exchangeFunction = mock(ExchangeFunction.class); this.configurer.filter(request, exchangeFunction); @@ -79,7 +79,7 @@ public class WebTestClientRestDocumentationConfigurerTests { @Test public void requestUriIsNotChangedWhenItHasAHost() { ClientRequest request = ClientRequest - .method(HttpMethod.GET, + .create(HttpMethod.GET, URI.create("https://api.example.com:4567/test?foo=bar#baz")) .header(WebTestClient.WEBTESTCLIENT_REQUEST_ID, "1").build(); ExchangeFunction exchangeFunction = mock(ExchangeFunction.class);