Interface MvcTestResult
- All Superinterfaces:
org.assertj.core.api.AssertProvider<MvcTestResultAssert>
Provides the result of an executed request using
MockMvcTester
that
is meant to be used with assertThat
.
Can be in one of two distinct states:
- The request processed successfully, even if it failed with an exception
that has been resolved. The result is available,
and
getUnresolvedException()
will returnnull
. - The request failed unexpectedly.
getUnresolvedException()
provides more information about the error, and any attempt to access the result will fail with an exception.
- Since:
- 6.2
- Author:
- Stephane Nicoll, Brian Clozel
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturn the result of the processing.Return the exception that was thrown unexpectedly while processing the request, if any.Methods inherited from interface org.assertj.core.api.AssertProvider
assertThat
-
Method Details
-
getMvcResult
MvcResult getMvcResult()Return the result of the processing. If the processing has failed with an unresolved exception, the result is not available, seegetUnresolvedException()
.- Returns:
- the
MvcResult
- Throws:
IllegalStateException
- if the processing has failed with an unresolved exception
-
getUnresolvedException
Return the exception that was thrown unexpectedly while processing the request, if any.
-