|
|
|
@ -1,5 +1,5 @@
@@ -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;
@@ -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;
@@ -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, |
|
|
|
|