public final class HmRsTextBody extends AbstractHmTextBody<Response>
This "matcher" tests given response body, assuming that it has text content.
The class is immutable and thread-safe.
Constructor and Description |
---|
HmRsTextBody(org.hamcrest.Matcher<String> bdm)
Ctor with charset set to default one.
|
HmRsTextBody(org.hamcrest.Matcher<String> bdm,
Charset charset)
Ctor.
|
HmRsTextBody(String expected)
Ctor with equalTo matcher and default charset.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
itemBody(Response item)
Item's body.
|
describeTo, matchesSafely
describeMismatch, describeMismatchSafely, matches
public HmRsTextBody(String expected)
expected
- String to test againstpublic HmRsTextBody(org.hamcrest.Matcher<String> bdm)
bdm
- Text body matcherpublic InputStream itemBody(Response item) throws IOException
AbstractHmTextBody
itemBody
in class AbstractHmTextBody<Response>
item
- Item to retrieve body fromIOException
- If some problem insideCopyright © 2015–2018 Take. All rights reserved.