Uses of Interface
org.springframework.test.web.servlet.RequestBuilder
Package
Description
Contains server-side support for testing Spring MVC applications.
AssertJ support for MockMvc.
Support for testing Spring MVC applications via
WebTestClient
with MockMvc
for server request
handling.Contains built-in
RequestBuilder
implementations.Contains built-in
MockMvcBuilder
implementations.-
Uses of RequestBuilder in org.springframework.test.web.servlet
Modifier and TypeInterfaceDescriptioninterface
Extended variant of aRequestBuilder
that applies itsorg.springframework.test.web.servlet.request.RequestPostProcessors
as a separate step from thebuildRequest(jakarta.servlet.ServletContext)
method.Modifier and TypeMethodDescriptionprotected final MockMvc
MockMvcBuilderSupport.createMockMvc
(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, Charset defaultResponseCharacterEncoding, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, List<DispatcherServletCustomizer> dispatcherServletCustomizers) Delegates toMockMvcBuilderSupport.createMockMvc(Filter[], MockServletConfig, WebApplicationContext, RequestBuilder, List, List, List)
for creation of theMockMvc
instance and configures that instance with the supplieddefaultResponseCharacterEncoding
.protected final MockMvc
MockMvcBuilderSupport.createMockMvc
(Filter[] filters, MockServletConfig servletConfig, WebApplicationContext webAppContext, RequestBuilder defaultRequestBuilder, List<ResultMatcher> globalResultMatchers, List<ResultHandler> globalResultHandlers, List<DispatcherServletCustomizer> dispatcherServletCustomizers) MockMvc.perform
(RequestBuilder requestBuilder) Perform a request and return a type that allows chaining further actions, such as asserting expectations, on the result. -
Uses of RequestBuilder in org.springframework.test.web.servlet.assertj
Modifier and TypeClassDescriptionfinal class
A builder forMockMultipartHttpServletRequest
that supports AssertJ.final class
A builder forMockHttpServletRequest
that supports AssertJ.Modifier and TypeMethodDescriptionMockMvcTester.perform
(RequestBuilder requestBuilder) Perform a request using the givenRequestBuilder
and return aresult
that can be used with standardAssertJ
assertions. -
Uses of RequestBuilder in org.springframework.test.web.servlet.client
Modifier and TypeMethodDescription<T extends B>
TMockMvcWebTestClient.MockMvcServerSpec.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. -
Uses of RequestBuilder in org.springframework.test.web.servlet.request
Modifier and TypeInterfaceDescriptioninterface
An extension ofSmartRequestBuilder
that can be configured withRequestPostProcessors
.Modifier and TypeClassDescriptionclass
Base builder forMockHttpServletRequest
required as input to perform requests inMockMvc
.class
AbstractMockMultipartHttpServletRequestBuilder<B extends AbstractMockMultipartHttpServletRequestBuilder<B>>
Base builder forMockMultipartHttpServletRequest
.class
Default builder forMockHttpServletRequest
required as input to perform requests inMockMvc
.class
Default builder forMockMultipartHttpServletRequest
.Modifier and TypeMethodDescriptionstatic RequestBuilder
MockMvcRequestBuilders.asyncDispatch
(MvcResult mvcResult) Create aRequestBuilder
for an async dispatch from theMvcResult
of the request that started async processing. -
Uses of RequestBuilder in org.springframework.test.web.servlet.setup
Modifier and TypeMethodDescriptionfinal <T extends B>
TAbstractMockMvcBuilder.defaultRequest
(RequestBuilder requestBuilder) <T extends B>
TConfigurableMockMvcBuilder.defaultRequest
(RequestBuilder requestBuilder) Define default request properties that should be merged into all performed requests.