Package com.github.ngeor.yak4j
Class RequestEntityAssert<T>
- java.lang.Object
-
- org.assertj.core.api.AbstractAssert<RequestEntityAssert<T>,RequestEntity<T>>
-
- com.github.ngeor.yak4j.RequestEntityAssert<T>
-
- Type Parameters:
T- The body type.
- All Implemented Interfaces:
Assert<RequestEntityAssert<T>,RequestEntity<T>>,Descriptable<RequestEntityAssert<T>>,ExtensionPoints<RequestEntityAssert<T>,RequestEntity<T>>
public class RequestEntityAssert<T> extends AbstractAssert<RequestEntityAssert<T>,RequestEntity<T>>
Assertions forRequestEntity.- Since:
- 0.12.0
-
-
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 RequestEntityAssert<T>hasAcceptHeader(MediaType mediaType)Verifies that the request entity's actual Accept header is equal to the given one.RequestEntityAssert<T>hasAuthorizationHeader(String value)Verifies that the request entity's Authorization header is equal to the given one.RequestEntityAssert<T>hasBody(T body)Verifies that the request entity's actual body is equal to the given one.RequestEntityAssert<T>hasContentTypeHeader(MediaType mediaType)Verifies that the request entity's Content-Type header is equal to the given one.RequestEntityAssert<T>hasJsonAcceptAndContentTypeHeaders()Verifies that the request entity's Accept and and Content-Type headers are both equal toapplication/json.RequestEntityAssert<T>hasJsonAcceptHeader()Verifies that the request entity's Accept header is equal toapplication/json.RequestEntityAssert<T>hasJsonContentTypeHeader()Verifies that the request entity's Content-Type header is equal toapplication/json.RequestEntityAssert<T>hasMethod(HttpMethod httpMethod)Verifies that the request entity's actual HTTP method is equal to the given one.RequestEntityAssert<T>hasUrl(String url)Verifies that the request entity's actual url is equal to the given one.RequestEntityAssert<T>hasUrl(URI url)Verifies that the request entity's actual url is equal to the given one.-
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
-
hasMethod
public RequestEntityAssert<T> hasMethod(HttpMethod httpMethod)
Verifies that the request entity's actual HTTP method is equal to the given one.
-
hasUrl
public RequestEntityAssert<T> hasUrl(URI url)
Verifies that the request entity's actual url is equal to the given one.
-
hasUrl
public RequestEntityAssert<T> hasUrl(String url)
Verifies that the request entity's actual url is equal to the given one.
-
hasBody
public RequestEntityAssert<T> hasBody(T body)
Verifies that the request entity's actual body is equal to the given one.
-
hasAcceptHeader
public RequestEntityAssert<T> hasAcceptHeader(MediaType mediaType)
Verifies that the request entity's actual Accept header is equal to the given one.
-
hasJsonAcceptHeader
public RequestEntityAssert<T> hasJsonAcceptHeader()
Verifies that the request entity's Accept header is equal toapplication/json.- See Also:
MediaType.APPLICATION_JSON
-
hasContentTypeHeader
public RequestEntityAssert<T> hasContentTypeHeader(MediaType mediaType)
Verifies that the request entity's Content-Type header is equal to the given one.
-
hasJsonContentTypeHeader
public RequestEntityAssert<T> hasJsonContentTypeHeader()
Verifies that the request entity's Content-Type header is equal toapplication/json.- See Also:
MediaType.APPLICATION_JSON
-
hasJsonAcceptAndContentTypeHeaders
public RequestEntityAssert<T> hasJsonAcceptAndContentTypeHeaders()
Verifies that the request entity's Accept and and Content-Type headers are both equal toapplication/json.- See Also:
MediaType.APPLICATION_JSON
-
hasAuthorizationHeader
public RequestEntityAssert<T> hasAuthorizationHeader(String value)
Verifies that the request entity's Authorization header is equal to the given one.
-
-