Class MvcResultAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
All Implemented Interfaces:
org.assertj.core.api.Assert<MvcResultAssert,AssertableMvcResult>, org.assertj.core.api.Descriptable<MvcResultAssert>, org.assertj.core.api.ExtensionPoints<MvcResultAssert,AssertableMvcResult>

AssertJ assertions that can be applied to MvcResult.
Since:
6.2
Author:
Stephane Nicoll, Brian Clozel
  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(ResultHandler resultHandler)
    Apply the given ResultHandler to the actual mvc result.
    org.assertj.core.api.ObjectAssert<Object>
    Verify that an asynchronous processing has started and return a new assertion object that uses the asynchronous result as the object to test.
    protected void
     
    Return a new assertion object that uses the response's content type as the object to test.
    Return a new assertion object that uses the response's cookies as the object to test.
    Verify that the request has not failed with an unresolved exception.
    org.assertj.core.api.MapAssert<String,Object>
    Return a new assertion object that uses the "output" flash attributes saved during request processing as the object to test.
    Provide the response to use if it is available.
    Return a new assertion object that uses the handler as the object to test.
    Verify that the request has failed with an unresolved exception.
    hasViewName(String viewName)
    Verify that a ModelAndView is available with a view equals to the given one.
    matches(ResultMatcher resultMatcher)
    Verify that the actual mvc result matches the given ResultMatcher.
    Verify that a ModelAndView is available and return a new assertion object that uses the model as the object to test.
    Return a new assertion object that uses the MockHttpServletRequest as the object to test.
    org.assertj.core.api.AbstractThrowableAssert<?,? extends Throwable>
    Verify that the request has failed with an unresolved exception, and return a new assertion object that uses the unresolved Exception as the object to test.
    org.assertj.core.api.AbstractStringAssert<?>
    Verify that a ModelAndView is available and return a new assertion object that uses the ModelAndView.getViewName() view name} as the object to test.

    Methods inherited from class org.springframework.test.web.servlet.assertj.AbstractMockHttpServletResponseAssert

    body, forwardedUrl, hasForwardedUrl, hasRedirectedUrl, redirectedUrl

    Methods inherited from class org.assertj.core.api.AbstractObjectAssert

    as, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison

    Methods inherited from class org.assertj.core.api.AbstractAssert

    areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, describedAs, describedAs