Rename MockMvcTestClient to MockMvcWebTestClient

Closes gh-19647
This commit is contained in:
Rossen Stoyanchev
2020-08-31 21:13:54 +01:00
parent 591ab8a00a
commit 9b6476c0a1
33 changed files with 148 additions and 148 deletions

View File

@@ -206,7 +206,7 @@ public class ExchangeResult {
* Return the result from the mock server exchange, if applicable, for
* further assertions on the state of the server response.
* @since 5.3
* @see org.springframework.test.web.servlet.client.MockMvcTestClient#resultActionsFor(ExchangeResult)
* @see org.springframework.test.web.servlet.client.MockMvcWebTestClient#resultActionsFor(ExchangeResult)
*/
@Nullable
public Object getMockServerResult() {

View File

@@ -27,7 +27,7 @@ import org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder;
import org.springframework.test.web.servlet.setup.MockMvcConfigurer;
/**
* Base class for implementations of {@link MockMvcTestClient.MockMvcServerSpec}
* Base class for implementations of {@link MockMvcWebTestClient.MockMvcServerSpec}
* that simply delegates to a {@link ConfigurableMockMvcBuilder} supplied by
* the concrete sub-classes.
*
@@ -35,8 +35,8 @@ import org.springframework.test.web.servlet.setup.MockMvcConfigurer;
* @since 5.3
* @param <B> the type of the concrete sub-class spec
*/
abstract class AbstractMockMvcServerSpec<B extends MockMvcTestClient.MockMvcServerSpec<B>>
implements MockMvcTestClient.MockMvcServerSpec<B> {
abstract class AbstractMockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
implements MockMvcWebTestClient.MockMvcServerSpec<B> {
@Override
public <T extends B> T filters(Filter... filters) {

View File

@@ -57,7 +57,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
* <p>Provides static factory methods and specs to initialize {@code MockMvc}
* to which the {@code WebTestClient} connects to. For example:
* <pre class="code">
* WebTestClient client = MockMvcTestClient.bindToController(myController)
* WebTestClient client = MockMvcWebTestClient.bindToController(myController)
* .controllerAdvice(myControllerAdvice)
* .validator(myValidator)
* .build()
@@ -65,7 +65,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
*
* <p>The client itself can also be configured. For example:
* <pre class="code">
* WebTestClient client = MockMvcTestClient.bindToController(myController)
* WebTestClient client = MockMvcWebTestClient.bindToController(myController)
* .validator(myValidator)
* .configureClient()
* .baseUrl("/path")
@@ -75,7 +75,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
* @author Rossen Stoyanchev
* @since 5.3
*/
public interface MockMvcTestClient {
public interface MockMvcWebTestClient {
/**
* Begin creating a {@link WebTestClient} by providing the {@code @Controller}
@@ -128,7 +128,7 @@ public interface MockMvcTestClient {
* .expectHeader().location("/persons/Joe")
* .expectBody().isEmpty();
*
* MockMvcTestClient.resultActionsFor(result)
* MockMvcWebTestClient.resultActionsFor(result)
* .andExpect(model().size(1))
* .andExpect(model().attributeExists("name"))
* .andExpect(flash().attributeCount(1))

View File

@@ -38,13 +38,13 @@ import org.springframework.web.util.pattern.PathPatternParser;
/**
* Simple wrapper around a {@link StandaloneMockMvcBuilder} that implements
* {@link MockMvcTestClient.ControllerSpec}.
* {@link MockMvcWebTestClient.ControllerSpec}.
*
* @author Rossen Stoyanchev
* @since 5.3
*/
class StandaloneMockMvcSpec extends AbstractMockMvcServerSpec<MockMvcTestClient.ControllerSpec>
implements MockMvcTestClient.ControllerSpec {
class StandaloneMockMvcSpec extends AbstractMockMvcServerSpec<MockMvcWebTestClient.ControllerSpec>
implements MockMvcWebTestClient.ControllerSpec {
private final StandaloneMockMvcBuilder mockMvcBuilder;