public class Contains extends ArgumentMatcher<java.lang.String> implements java.io.Serializable
| Constructor and Description |
|---|
Contains(java.lang.String substring) |
| 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.
|
boolean |
matches(java.lang.Object actual)
Returns whether this matcher accepts the given argument.
|
public boolean matches(java.lang.Object actual)
ArgumentMatcherThe method should never assert if the argument doesn't match. It should only return false.
matches in interface org.hamcrest.Matcher<java.lang.String>matches in class ArgumentMatcher<java.lang.String>actual - the argumentpublic 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<java.lang.String>description - the description to which the matcher description is
appended.