public final class HmRqBody
extends org.hamcrest.TypeSafeMatcher<T>
This "matcher" tests given request body.
Constructor and Description |
---|
HmRqBody(byte[] value)
Ctor.
|
HmRqBody(InputStream value)
Ctor.
|
HmRqBody(String value)
Ctor.
|
HmRqBody(String value,
Charset charset)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
describeTo(org.hamcrest.Description description) |
InputStream |
itemBody(Request item)
Item's body.
|
protected boolean |
matchesSafely(T item) |
describeMismatch, describeMismatchSafely, matches
public HmRqBody(String value)
Will create instance with defaultCharset.
value
- Value to test againstpublic HmRqBody(String value, Charset charset)
value
- Value to test againstcharset
- Charset of given valuepublic HmRqBody(byte[] value)
value
- Value to test againstpublic HmRqBody(InputStream value)
value
- Value to test againstpublic InputStream itemBody(Request 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.