public abstract class CompareTo<T extends Comparable<T>> extends ArgumentMatcher<T>
| Constructor and Description |
|---|
CompareTo(Comparable<T> value) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description)
By default this method decamelizes matchers name to promote meaningful names for matchers.
|
protected abstract String |
getName() |
boolean |
matches(Object actual)
Returns whether this matcher accepts the given argument.
|
protected abstract boolean |
matchResult(int result) |
public CompareTo(Comparable<T> value)
public boolean matches(Object actual)
ArgumentMatcherThe method should never assert if the argument doesn't match. It should only return false.
matches in interface org.hamcrest.Matcher<T extends Comparable<T>>matches in class ArgumentMatcher<T extends Comparable<T>>actual - the argumentBaseMatcherpublic void describeTo(org.hamcrest.Description description)
ArgumentMatcherFor example StringWithStrongLanguage matcher will generate 'String with strong language' description in case of failure.
You might want to override this method to provide more specific description of the matcher (useful when verification failures are reported).
describeTo in interface org.hamcrest.SelfDescribingdescribeTo in class ArgumentMatcher<T extends Comparable<T>>description - the description to which the matcher description is
appended.protected abstract String getName()
protected abstract boolean matchResult(int result)
Mockito, MIT License