public final class HmRsBody
extends org.hamcrest.TypeSafeMatcher<T>
This "matcher" tests given response body.
Constructor and Description |
---|
HmRsBody(byte[] value)
Ctor.
|
HmRsBody(InputStream value)
Ctor.
|
HmRsBody(String value)
Ctor.
|
HmRsBody(String value,
Charset charset)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
describeTo(org.hamcrest.Description description) |
InputStream |
itemBody(Response item)
Item's body.
|
protected boolean |
matchesSafely(T item) |
describeMismatch, describeMismatchSafely, matches
public HmRsBody(String value)
Will create instance with defaultCharset.
value
- Value to test againstpublic HmRsBody(String value, Charset charset)
value
- Value to test againstcharset
- Charset of given valuepublic HmRsBody(byte[] value)
value
- Value to test againstpublic HmRsBody(InputStream value)
value
- Value to test againstpublic InputStream itemBody(Response item) throws IOException
item
- Item to retrieve body fromIOException
- If some problem insidepublic final void describeTo(org.hamcrest.Description description)
protected final boolean matchesSafely(T item)
matchesSafely
in class org.hamcrest.TypeSafeMatcher<T>
Copyright © 2015–2018 Take. All rights reserved.