public class StringEndsWith extends SubstringMatcher
substring| Constructor and Description |
|---|
StringEndsWith(boolean ignoringCase,
String substring) |
StringEndsWith(String substring) |
| Modifier and Type | Method and Description |
|---|---|
static Matcher<String> |
endsWith(String suffix)
|
static Matcher<String> |
endsWithIgnoringCase(String suffix)
|
protected boolean |
evalSubstringOf(String s) |
converted, describeMismatchSafely, describeTo, matchesSafelydescribeMismatch, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toStringpublic StringEndsWith(String substring)
public StringEndsWith(boolean ignoringCase,
String substring)
protected boolean evalSubstringOf(String s)
evalSubstringOf in class SubstringMatcherpublic static Matcher<String> endsWith(String suffix)
String ends with the specified
String.
For example:
assertThat("myStringOfNote", endsWith("Note"))suffix - the substring that the returned matcher will expect at the end of any examined stringpublic static Matcher<String> endsWithIgnoringCase(String suffix)
String ends with the specified
String, ignoring case.
For example:
assertThat("myStringOfNote", endsWithIgnoringCase("note"))suffix - the substring that the returned matcher will expect at the end of any examined stringCopyright © 2021. All rights reserved.