Package org.takes.facets.hamcrest
Class HmBody<T extends Body>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeMatcher<T>
-
- org.takes.facets.hamcrest.HmBody<T>
-
- Type Parameters:
T
- Item type. Should be able to return own item
- All Implemented Interfaces:
org.hamcrest.Matcher<T>
,org.hamcrest.SelfDescribing
public final class HmBody<T extends Body> extends org.hamcrest.TypeSafeMatcher<T>
Body Matcher.This "matcher" tests given item body
- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
describeMismatchSafely(T item, org.hamcrest.Description description)
void
describeTo(org.hamcrest.Description description)
boolean
matchesSafely(T item)
-
-
-
Constructor Detail
-
HmBody
public HmBody(String value)
Ctor.Will create instance with defaultCharset.
- Parameters:
value
- Value to test against
-
HmBody
public HmBody(String value, Charset charset)
Ctor.- Parameters:
value
- Value to test againstcharset
- Charset of given value
-
HmBody
public HmBody(byte[] value)
Ctor.- Parameters:
value
- Value to test against
-
HmBody
public HmBody(InputStream value)
Ctor.- Parameters:
value
- Value to test against.
-
-
Method Detail
-
describeTo
public void describeTo(org.hamcrest.Description description)
-
describeMismatchSafely
public void describeMismatchSafely(T item, org.hamcrest.Description description)
-
-