Package com.github.ngeor.yak4j
Class ResultActionsAssert
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<ResultActionsAssert,ResultActions>
-
- com.github.ngeor.yak4j.ResultActionsAssert
-
- All Implemented Interfaces:
Assert<ResultActionsAssert,ResultActions>,Descriptable<ResultActionsAssert>,ExtensionPoints<ResultActionsAssert,ResultActions>
public final class ResultActionsAssert extends AbstractAssert<ResultActionsAssert,ResultActions>
Assertion DSL forResultActions.
-
-
Field Summary
-
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultActionsAssertcontainsValidationErrorsExactly(InvalidFieldExpectation... invalidFieldExpectations)Checks that the MVC response contains the given validation errors and only these.ResultActionsAsserthasStatus(HttpStatus httpStatus)ResultActionsAssertisBadRequest()ResultActionsAssertisBadRequest(InvalidFieldExpectation... invalidFieldExpectations)ResultActionsAssertisConflict()ResultActionsAssertisCreated()ResultActionsAssertisForbidden()ResultActionsAssertisInternalServerError()ResultActionsAssertisNotFound()ResultActionsAssertisOk()ResultActionsAssertisUnauthorized()ResultActionsAssertresolvedExceptionIsInstanceOf(Class<? extends Exception> exceptionClass)Checks that the result has a resolved exception of the given class.-
Methods inherited from class org.assertj.core.api.AbstractAssert
asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, 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, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingRecursiveComparison, usingRecursiveComparison, 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, as, as, describedAs
-
-
-
-
Method Detail
-
containsValidationErrorsExactly
public ResultActionsAssert containsValidationErrorsExactly(InvalidFieldExpectation... invalidFieldExpectations)
Checks that the MVC response contains the given validation errors and only these.- Parameters:
invalidFieldExpectations- A collection of expected invalid fields.- Returns:
- This instance.
-
hasStatus
public ResultActionsAssert hasStatus(HttpStatus httpStatus) throws Exception
- Throws:
Exception
-
isBadRequest
public ResultActionsAssert isBadRequest() throws Exception
- Throws:
Exception
-
isBadRequest
public ResultActionsAssert isBadRequest(InvalidFieldExpectation... invalidFieldExpectations) throws Exception
- Throws:
Exception
-
isConflict
public ResultActionsAssert isConflict() throws Exception
- Throws:
Exception
-
isCreated
public ResultActionsAssert isCreated() throws Exception
- Throws:
Exception
-
isForbidden
public ResultActionsAssert isForbidden() throws Exception
- Throws:
Exception
-
isInternalServerError
public ResultActionsAssert isInternalServerError() throws Exception
- Throws:
Exception
-
isNotFound
public ResultActionsAssert isNotFound() throws Exception
- Throws:
Exception
-
isOk
public ResultActionsAssert isOk() throws Exception
- Throws:
Exception
-
isUnauthorized
public ResultActionsAssert isUnauthorized() throws Exception
- Throws:
Exception
-
resolvedExceptionIsInstanceOf
public ResultActionsAssert resolvedExceptionIsInstanceOf(Class<? extends Exception> exceptionClass)
Checks that the result has a resolved exception of the given class.- Parameters:
exceptionClass- The expected class of the resolved exception.- Returns:
- This instance.
- See Also:
MvcResult.getResolvedException()
-
-