Package | Description |
---|---|
org.springframework.test.web.servlet |
Contains server-side support for testing Spring MVC applications.
|
org.springframework.test.web.servlet.result |
Contains built-in
ResultMatcher and ResultHandler implementations. |
org.springframework.test.web.servlet.setup |
Contains built-in
MockMvcBuilder implementations. |
Modifier and Type | Method and Description |
---|---|
ResultActions |
ResultActions.andDo(ResultHandler handler)
Perform a general action.
|
Modifier and Type | Method and Description |
---|---|
protected MockMvc |
MockMvcBuilderSupport.createMockMvc(Filter[] filters,
MockServletConfig servletConfig,
WebApplicationContext webAppContext,
RequestBuilder defaultRequestBuilder,
List<ResultMatcher> globalResultMatchers,
List<ResultHandler> globalResultHandlers,
List<DispatcherServletCustomizer> dispatcherServletCustomizers) |
Modifier and Type | Class and Description |
---|---|
class |
PrintingResultHandler
Result handler that prints
MvcResult details to a given output
stream — for example: System.out , System.err , a
custom java.io.PrintWriter , etc. |
Modifier and Type | Method and Description |
---|---|
static ResultHandler |
MockMvcResultHandlers.log()
Log
MvcResult details as a DEBUG log message via
Apache Commons Logging using the log category
org.springframework.test.web.servlet.result . |
static ResultHandler |
MockMvcResultHandlers.print()
Print
MvcResult details to the "standard" output stream. |
static ResultHandler |
MockMvcResultHandlers.print(OutputStream stream)
Print
MvcResult details to the supplied OutputStream . |
static ResultHandler |
MockMvcResultHandlers.print(Writer writer)
|
Modifier and Type | Method and Description |
---|---|
<T extends B> |
AbstractMockMvcBuilder.alwaysDo(ResultHandler resultHandler) |
<T extends B> |
ConfigurableMockMvcBuilder.alwaysDo(ResultHandler resultHandler)
Define a global action that should always be applied to every
response.
|