org.hamcrest.core
public class DescribedAs<T> extends org.hamcrest.BaseMatcher<T>
| Constructor and Description |
|---|
DescribedAs(java.lang.String descriptionTemplate,
org.hamcrest.Matcher<T> matcher,
java.lang.Object[] values) |
| Modifier and Type | Method and Description |
|---|---|
static <T> org.hamcrest.Matcher<T> |
describedAs(java.lang.String description,
org.hamcrest.Matcher<T> matcher,
java.lang.Object... values)
Wraps an existing matcher and overrides the description when it fails.
|
void |
describeTo(org.hamcrest.Description description)
Generates a description of the object.
|
boolean |
matches(java.lang.Object o)
Evaluates the matcher for argument item.
|
public DescribedAs(java.lang.String descriptionTemplate,
org.hamcrest.Matcher<T> matcher,
java.lang.Object[] values)
public boolean matches(java.lang.Object o)
org.hamcrest.Matchero - the object against which the matcher is evaluated.true if item matches, otherwise false.BaseMatcherpublic void describeTo(org.hamcrest.Description description)
org.hamcrest.SelfDescribingdescription - The description to be built or appended to.public static <T> org.hamcrest.Matcher<T> describedAs(java.lang.String description,
org.hamcrest.Matcher<T> matcher,
java.lang.Object... values)