public class HasToString<T> extends FeatureMatcher<T,String>
Constructor and Description |
---|
HasToString(Matcher<? super String> toStringMatcher) |
Modifier and Type | Method and Description |
---|---|
protected String |
featureValueOf(T actual)
Implement this to extract the interesting feature.
|
static <T> Matcher<T> |
hasToString(Matcher<? super String> toStringMatcher)
Evaluates whether item.toString() satisfies a given matcher.
|
static <T> Matcher<T> |
hasToString(String expectedToString)
This is a shortcut to the frequently used has_string(equalTo(x)).
|
describeTo, matchesSafely
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
protected String featureValueOf(T actual)
FeatureMatcher
featureValueOf
in class FeatureMatcher<T,String>
actual
- the target objectpublic static <T> Matcher<T> hasToString(Matcher<? super String> toStringMatcher)
Copyright © 2016. All rights reserved.