Class ResponseAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<ResponseAssert, javax.ws.rs.core.Response>
ubic.gemma.rest.util.ResponseAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<ResponseAssert, javax.ws.rs.core.Response>, org.assertj.core.api.Descriptable<ResponseAssert>, org.assertj.core.api.ExtensionPoints<ResponseAssert, javax.ws.rs.core.Response>
public class ResponseAssert
extends org.assertj.core.api.AbstractAssert<ResponseAssert, javax.ws.rs.core.Response>
Assertions for jax-rs
Response.- Author:
- poirigui
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.assertj.core.api.MapAssert<String, javax.ws.rs.core.NewCookie> cookies()doesNotHaveEncoding(String encoding) doesNotHaveHeader(String name) Asserts that the response does not have the given header.doesNotHaveHeaderWithValue(String name, String value) Asserts that the response does not have the given header with a particular value.org.assertj.core.api.ObjectAssert<?> entity()<T> org.assertj.core.api.ObjectAssert<T> org.assertj.core.api.InputStreamAssertorg.assertj.core.api.StringAsserthasEncoding(String encoding) Asserts that the response has the given 'Content-Encoding' header.Asserts that the response has the given header.hasHeaderSatisfying(String name, Consumer<List<String>> consumer) hasHeaderWithValue(String name, String value) Asserts that the response has the given header with a particular value.hasLanguage(Locale locale) Asserts that the response has a 'Content-Length' header.hasLength(int length) Asserts that the response has a 'Content-Length' header with the given length.hasMediaType(javax.ws.rs.core.MediaType mediaType) Asserts that the response has the given media type.hasMediaTypeCompatibleWith(javax.ws.rs.core.MediaType mediaType) Asserts that the response has a media type compatible with the given media type.hasStatus(javax.ws.rs.core.Response.Status status) Asserts that the response has the given status code and reason phrase.hasStatusFamily(javax.ws.rs.core.Response.Status.Family family) Asserts that that response status is within the given status family.headers()Methods inherited from class org.assertj.core.api.AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, 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, usingEquals, usingEquals, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptable
as, as, as, describedAs, describedAs
-
Constructor Details
-
ResponseAssert
public ResponseAssert(javax.ws.rs.core.Response actual)
-
-
Method Details
-
hasStatus
Asserts that the response has the given status code and reason phrase. -
hasStatusFamily
Asserts that that response status is within the given status family. -
hasMediaType
Asserts that the response has the given media type. -
hasMediaTypeCompatibleWith
Asserts that the response has a media type compatible with the given media type. -
headers
-
hasHeader
Asserts that the response has the given header. -
hasHeaderWithValue
Asserts that the response has the given header with a particular value.If the header is multivalued, asserts that at least one value is satisfied.
-
hasHeaderSatisfying
-
doesNotHaveHeader
Asserts that the response does not have the given header. -
doesNotHaveHeaderWithValue
Asserts that the response does not have the given header with a particular value.If the header is multivalued, asserts that no value is satisfied.
-
hasLength
Asserts that the response has a 'Content-Length' header. -
hasLength
Asserts that the response has a 'Content-Length' header with the given length. -
hasEncoding
Asserts that the response has the given 'Content-Encoding' header. -
doesNotHaveEncoding
-
hasLanguage
-
cookies
-
entity
public org.assertj.core.api.ObjectAssert<?> entity() -
entityAs
-
entityAsString
public org.assertj.core.api.StringAssert entityAsString() -
entityAsStream
public org.assertj.core.api.InputStreamAssert entityAsStream()
-