Class AssertableMockMvc

java.lang.Object
org.springframework.test.web.servlet.assertj.AssertableMockMvc

public final class AssertableMockMvc extends Object
MockMvc variant that tests Spring MVC exchanges and provides fluent assertions using AssertJ.

A main difference with MockMvc is that an unresolved exception is not thrown directly. Rather an AssertableMvcResult is available with an unresolved exception.

AssertableMockMvc can be configured with a list of message converters to allow the response body to be deserialized, rather than asserting on the raw values.

Since:
6.2
Author:
Stephane Nicoll, Brian Clozel