public class StringContains extends SubstringMatcher
substring| Constructor and Description |
|---|
StringContains(boolean ignoringCase,
String substring) |
StringContains(String substring) |
| Modifier and Type | Method and Description |
|---|---|
static Matcher<String> |
containsString(String substring)
|
static Matcher<String> |
containsStringIgnoringCase(String substring)
|
protected boolean |
evalSubstringOf(String s) |
converted, describeMismatchSafely, describeTo, matchesSafelydescribeMismatch, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toStringpublic StringContains(String substring)
public StringContains(boolean ignoringCase,
String substring)
protected boolean evalSubstringOf(String s)
evalSubstringOf in class SubstringMatcherpublic static Matcher<String> containsString(String substring)
String contains the specified
String anywhere.
For example:
assertThat("myStringOfNote", containsString("ring"))substring - the substring that the returned matcher will expect to find within any examined stringpublic static Matcher<String> containsStringIgnoringCase(String substring)
String contains the specified
String anywhere, ignoring case.
For example:
assertThat("myStringOfNote", containsStringIgnoringCase("Ring"))substring - the substring that the returned matcher will expect to find within any examined stringCopyright © 2021. All rights reserved.