B
- a self reference to the builder typepublic static interface MockMvcWebTestClient.MockMvcServerSpec<B extends MockMvcWebTestClient.MockMvcServerSpec<B>>
MockMvc
, and a simple facade
around ConfigurableMockMvcBuilder
.Modifier and Type | Method and Description |
---|---|
<T extends B> |
alwaysExpect(ResultMatcher resultMatcher)
Define a global expectation that should always be applied to
every response.
|
<T extends B> |
apply(MockMvcConfigurer configurer)
Add a
MockMvcConfigurer that automates MockMvc setup. |
WebTestClient |
build()
Shortcut to build the test client.
|
WebTestClient.Builder |
configureClient()
Proceed to configure and build the test client.
|
<T extends B> |
defaultRequest(RequestBuilder requestBuilder)
Define default request properties that should be merged into all
performed requests such that input from the client request override
the default properties defined here.
|
<T extends B> |
dispatcherServletCustomizer(DispatcherServletCustomizer customizer)
Allow customization of
DispatcherServlet . |
<T extends B> |
dispatchOptions(boolean dispatchOptions)
Whether to handle HTTP OPTIONS requests.
|
<T extends B> |
filter(Filter filter,
String... urlPatterns)
Add a filter for specific URL patterns.
|
<T extends B> |
filters(Filter... filters)
Add a global filter.
|
<T extends B> T filters(Filter... filters)
This is delegated to
ConfigurableMockMvcBuilder.addFilters(Filter...)
.
<T extends B> T filter(Filter filter, String... urlPatterns)
This is delegated to
ConfigurableMockMvcBuilder.addFilter(Filter, String...)
.
<T extends B> T defaultRequest(RequestBuilder requestBuilder)
This is delegated to
ConfigurableMockMvcBuilder.defaultRequest(RequestBuilder)
.
<T extends B> T alwaysExpect(ResultMatcher resultMatcher)
This is delegated to
ConfigurableMockMvcBuilder.alwaysExpect(ResultMatcher)
.
<T extends B> T dispatchOptions(boolean dispatchOptions)
This is delegated to
ConfigurableMockMvcBuilder.dispatchOptions(boolean)
.
<T extends B> T dispatcherServletCustomizer(DispatcherServletCustomizer customizer)
DispatcherServlet
.
This is delegated to
ConfigurableMockMvcBuilder.addDispatcherServletCustomizer(DispatcherServletCustomizer)
.
<T extends B> T apply(MockMvcConfigurer configurer)
MockMvcConfigurer
that automates MockMvc setup.
This is delegated to
ConfigurableMockMvcBuilder.apply(MockMvcConfigurer)
.
WebTestClient.Builder configureClient()
WebTestClient build()