api

http4k / org.http4k.hamkrest

Package org.http4k.hamkrest

Matchers for use with the hamkrest matching library.

Functions

Name Summary
hasAuthority fun hasAuthority(expected: String): Matcher<Uri>
hasBody fun hasBody(expected: Matcher<Body>): Matcher<HttpMessage>
fun hasBody(expected: Matcher<String?>): Matcher<HttpMessage>
fun hasBody(expected: CharSequence): Matcher<HttpMessage>
fun hasBody(expected: Regex): Matcher<HttpMessage>
fun <T> hasBody(lens: BodyLens<T>, matcher: Matcher<T>): Matcher<HttpMessage>
fun <NODE> Json<NODE>.hasBody(expected: NODE): Matcher<HttpMessage>
fun <NODE> Json<NODE>.hasBody(expected: Matcher<NODE>): Matcher<HttpMessage>
fun <NODE> Json<NODE>.hasBody(expected: String): Matcher<HttpMessage>
hasContentType fun hasContentType(expected: ContentType): Matcher<HttpMessage>
hasCookie fun hasCookie(expected: Cookie): Matcher<Request>
fun hasCookie(name: String, expected: Regex): Matcher<Request>
fun hasCookie(name: String, expected: String): Matcher<Request>
fun hasCookie(name: String, matcher: Matcher<Cookie>): Matcher<Request>
hasCookieDomain fun hasCookieDomain(expected: CharSequence): Matcher<Cookie>
hasCookieExpiry fun hasCookieExpiry(expected: LocalDateTime): Matcher<Cookie>
fun hasCookieExpiry(matcher: Matcher<LocalDateTime>): Matcher<Cookie>
hasCookieName fun hasCookieName(expected: CharSequence): Matcher<Cookie>
hasCookiePath fun hasCookiePath(expected: CharSequence): Matcher<Cookie>
hasCookieValue fun hasCookieValue(matcher: Matcher<String?>): Matcher<Cookie>
fun hasCookieValue(expected: CharSequence): Matcher<Cookie>
hasForm fun hasForm(name: String, matcher: Matcher<String?>): Matcher<Request>
fun hasForm(name: String, expected: Regex): Matcher<Request>
fun hasForm(name: String, expected: CharSequence): Matcher<Request>
hasFormField fun <T> hasFormField(lens: Lens<WebForm, T>, matcher: Matcher<T>): Matcher<WebForm>
hasHeader fun <T> hasHeader(lens: HeaderLens<T>, matcher: Matcher<T>): Matcher<HttpMessage>
fun hasHeader(name: String, matcher: Matcher<String?>): Matcher<HttpMessage>
fun hasHeader(name: String, expected: CharSequence): Matcher<HttpMessage>
fun hasHeader(name: String, expected: Regex): Matcher<HttpMessage>
fun hasHeader(name: String): Matcher<HttpMessage>
fun hasHeader(name: String, expected: List<String?>): Matcher<HttpMessage>
hasHost fun hasHost(expected: String): Matcher<Uri>
hasMethod fun hasMethod(expected: Method): Matcher<Request>
hasPort fun hasPort(expected: Int): Matcher<Uri>
hasQuery fun <T> hasQuery(lens: QueryLens<T>, matcher: Matcher<T>): Matcher<Request>
fun hasQuery(name: String, matcher: Matcher<String?>): Matcher<Request>
fun hasQuery(name: String, expected: CharSequence): Matcher<Request>
fun hasQuery(name: String, expected: Regex): Matcher<Request>
fun hasQuery(name: String, expected: List<String?>): Matcher<Request>
hasRequest fun hasRequest(matcher: Matcher<Request>): Matcher<HttpTransaction>
hasResponse fun hasResponse(matcher: Matcher<Response>): Matcher<HttpTransaction>
hasSetCookie fun hasSetCookie(expected: Cookie): Matcher<Response>
fun hasSetCookie(name: String, expected: Matcher<Cookie>): Matcher<Response>
hasStatus fun hasStatus(expected: Status): Matcher<Response>
hasUri fun hasUri(expected: Regex): Matcher<Request>
fun hasUri(expected: Uri): Matcher<Request>
fun hasUri(expected: String): Matcher<Request>
fun hasUri(expected: Matcher<Uri>): Matcher<Request>
hasUriPath fun hasUriPath(matcher: Matcher<String?>): Matcher<Uri>
fun hasUriPath(expected: String): Matcher<Uri>
fun hasUriPath(expected: Regex): Matcher<Uri>
hasUriQuery fun hasUriQuery(expected: String): Matcher<Uri>
isHttpOnlyCookie fun isHttpOnlyCookie(expected: Boolean = true): Matcher<Cookie>
isSecureCookie fun isSecureCookie(expected: Boolean = true): Matcher<Cookie>