public final class HmRqHeader
extends org.hamcrest.TypeSafeMatcher<T>
This "matcher" tests given request headers.
The class is immutable and thread-safe.
Constructor and Description |
---|
HmRqHeader(org.hamcrest.Matcher<String> hdrm,
org.hamcrest.Matcher<Iterable<String>> vlm)
Ctor.
|
HmRqHeader(String hdr,
org.hamcrest.Matcher<Iterable<String>> vlm)
Ctor.
|
HmRqHeader(String hdr,
String val)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
describeMismatchSafely(T item,
org.hamcrest.Description description) |
void |
describeTo(org.hamcrest.Description description) |
Iterable<String> |
headers(Request item)
Returns item's headers.
|
boolean |
matchesSafely(T item) |
public HmRqHeader(org.hamcrest.Matcher<String> hdrm, org.hamcrest.Matcher<Iterable<String>> vlm)
hdrm
- Header matchervlm
- Value matcherpublic HmRqHeader(String hdr, org.hamcrest.Matcher<Iterable<String>> vlm)
hdr
- Header namevlm
- Value matcherpublic Iterable<String> headers(Request item) throws IOException
item
- To extract headers fromIOException
- If something goes wrongpublic final void describeTo(org.hamcrest.Description description)
public final boolean matchesSafely(T item)
matchesSafely
in class org.hamcrest.TypeSafeMatcher<T>
public final void describeMismatchSafely(T item, org.hamcrest.Description description)
describeMismatchSafely
in class org.hamcrest.TypeSafeMatcher<T>
Copyright © 2015–2018 Take. All rights reserved.