T
- Item type. Should be able to return own bodypublic abstract class AbstractHmTextBody<T>
extends org.hamcrest.TypeSafeMatcher<T>
This "matcher" tests given item body, assuming that it has text content.
The class is immutable and thread-safe.
Constructor and Description |
---|
AbstractHmTextBody(org.hamcrest.Matcher<String> body,
Charset charset)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
describeMismatchSafely(T item,
org.hamcrest.Description description) |
void |
describeTo(org.hamcrest.Description description) |
protected abstract InputStream |
itemBody(T item)
Item's body.
|
protected boolean |
matchesSafely(T item) |
public final void describeTo(org.hamcrest.Description description)
protected final boolean matchesSafely(T item)
matchesSafely
in class org.hamcrest.TypeSafeMatcher<T>
protected final void describeMismatchSafely(T item, org.hamcrest.Description description)
describeMismatchSafely
in class org.hamcrest.TypeSafeMatcher<T>
protected abstract InputStream itemBody(T item) throws IOException
item
- Item to retrieve body fromIOException
- If some problem insideCopyright © 2015–2019 Take. All rights reserved.