public class CharSequenceContains extends SubCharSequenceMatcher
mSubstring| Modifier and Type | Method and Description |
|---|---|
static <any> |
containsCharSequence(java.lang.CharSequence substring)
Creates a matcher that matches if the examined
CharSequence contains the specified
CharSequence anywhere. |
static <any> |
containsString(java.lang.CharSequence substring)
Alias for
containsCharSequence(CharSequence) for better discoverability. |
protected boolean |
evalSubstringOf(java.lang.CharSequence s) |
protected java.lang.CharSequence |
relationship() |
describeMismatchSafely, describeTo, matchesSafelyprotected boolean evalSubstringOf(java.lang.CharSequence s)
evalSubstringOf in class SubCharSequenceMatcherprotected java.lang.CharSequence relationship()
relationship in class SubCharSequenceMatcherpublic static <any> containsString(java.lang.CharSequence substring)
containsCharSequence(CharSequence) for better discoverability.public static <any> containsCharSequence(java.lang.CharSequence substring)
CharSequence contains the specified
CharSequence anywhere.
For example:
assertThat("myStringOfNote", containsCharSequence("ring"))substring - the substring that the returned matcher will expect to find within any
examined string