T - The body of the response.public class ResponseEntityAssert<T> extends org.assertj.core.api.AbstractAssert<ResponseEntityAssert<T>,org.springframework.http.ResponseEntity<T>>
ResponseEntity.| Constructor and Description |
|---|
ResponseEntityAssert(org.springframework.http.ResponseEntity<T> responseEntity) |
| Modifier and Type | Method and Description |
|---|---|
static <T> ResponseEntityAssert<T> |
assertThat(org.springframework.http.ResponseEntity<T> responseEntity) |
ResponseEntityAssert<T> |
hasBody(T body)
Verifies that the response contains the given object as body.
|
ResponseEntityAssert<T> |
hasStatus(org.springframework.http.HttpStatus httpStatus)
Verifies that the response has the given HTTP status code.
|
ResponseEntityAssert<T> |
isOk() |
as, as, asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnErrorpublic ResponseEntityAssert(org.springframework.http.ResponseEntity<T> responseEntity)
public static <T> ResponseEntityAssert<T> assertThat(org.springframework.http.ResponseEntity<T> responseEntity)
public ResponseEntityAssert<T> hasStatus(org.springframework.http.HttpStatus httpStatus)
httpStatus - The expected HTTP status code.public ResponseEntityAssert<T> isOk()
public ResponseEntityAssert<T> hasBody(T body)
body - The expected body.Copyright © 2018. All rights reserved.