public class CharSequenceContains extends SubCharSequenceMatcher
mSubstring
Modifier and Type | Method and Description |
---|---|
static <any> |
containsCharSequence(CharSequence substring)
Creates a matcher that matches if the examined
CharSequence contains the specified
CharSequence anywhere. |
static <any> |
containsString(CharSequence substring)
Alias for
containsCharSequence(CharSequence) for better discoverability. |
protected boolean |
evalSubstringOf(CharSequence s) |
protected CharSequence |
relationship() |
describeMismatchSafely, describeTo, matchesSafely
protected boolean evalSubstringOf(CharSequence s)
evalSubstringOf
in class SubCharSequenceMatcher
protected CharSequence relationship()
relationship
in class SubCharSequenceMatcher
public static <any> containsString(CharSequence substring)
containsCharSequence(CharSequence)
for better discoverability.public static <any> containsCharSequence(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