From 2e2a62a23c6fbc9b6e572d364b5b9e84d17fb109 Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Tue, 26 Sep 2023 11:32:47 +0100 Subject: [PATCH] Polishing --- .../server/WebTestClientConfigurer.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClientConfigurer.java b/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClientConfigurer.java index 7ae16c7161b..bf5bfb43930 100644 --- a/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClientConfigurer.java +++ b/spring-test/src/main/java/org/springframework/test/web/reactive/server/WebTestClientConfigurer.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 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. @@ -21,9 +21,9 @@ import org.springframework.lang.Nullable; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; /** - * Contract that frameworks or applications can use to pre-package a set of - * customizations to a {@link WebTestClient.Builder} and expose that - * as a shortcut. + * Contract to encapsulate customizations to a {@link WebTestClient.Builder}. + * Typically used by frameworks that wish to provide a shortcut for common + * initialization. * * @author Rossen Stoyanchev * @since 5.0 @@ -32,12 +32,14 @@ import org.springframework.web.server.adapter.WebHttpHandlerBuilder; public interface WebTestClientConfigurer { /** - * Invoked once only, immediately (i.e. before this method returns). - * @param builder the WebTestClient builder to make changes to - * @param httpHandlerBuilder the builder for the "mock server" HttpHandler - * this client was configured for "mock server" testing - * @param connector the connector for "live" integration tests if this - * server was configured for live integration testing + * Use methods on {@link WebTestClient.Builder} to modify test client + * settings. For a mock WebFlux server, use {@link WebHttpHandlerBuilder} + * to customize server configuration. For a MockMvc server, mutate the + * {@link org.springframework.test.web.servlet.client.MockMvcHttpConnector} + * and set it on {@link WebTestClient.Builder}. + * @param builder the WebTestClient builder for test client changes + * @param httpHandlerBuilder for mock WebFlux server settings + * @param connector the connector in use */ void afterConfigurerAdded(WebTestClient.Builder builder, @Nullable WebHttpHandlerBuilder httpHandlerBuilder,