Package | Description |
---|---|
org.springframework.test.web.servlet |
Contains server-side support for testing Spring MVC applications.
|
org.springframework.test.web.servlet.client |
Support for testing Spring MVC applications via
WebTestClient
with MockMvc for server request
handling. |
Modifier and Type | Method and Description |
---|---|
ResultActions |
ResultActions.andDo(ResultHandler handler)
Perform a general action.
|
ResultActions |
ResultActions.andExpect(ResultMatcher matcher)
Perform an expectation.
|
default ResultActions |
ResultActions.andExpectAll(ResultMatcher... matchers)
Perform multiple expectations, with the guarantee that all expectations
will be asserted even if one or more expectations fail with an exception.
|
ResultActions |
MockMvc.perform(RequestBuilder requestBuilder)
Perform a request and return a type that allows chaining further
actions, such as asserting expectations, on the result.
|
Modifier and Type | Method and Description |
---|---|
static ResultActions |
MockMvcWebTestClient.resultActionsFor(ExchangeResult exchangeResult)
This method can be used to apply further assertions on a given
ExchangeResult based the state of the server response. |