public class StringEndsWith extends SubstringMatcher
substring
Constructor and Description |
---|
StringEndsWith(boolean ignoringCase,
java.lang.String substring) |
Modifier and Type | Method and Description |
---|---|
static Matcher<java.lang.String> |
endsWith(java.lang.String suffix)
Creates a matcher that matches if the examined
String ends with the specified
String . |
static Matcher<java.lang.String> |
endsWithIgnoringCase(java.lang.String suffix)
Creates a matcher that matches if the examined
String ends with the specified
String , ignoring case. |
protected boolean |
evalSubstringOf(java.lang.String s) |
converted, describeMismatchSafely, describeTo, matchesSafely
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
public StringEndsWith(boolean ignoringCase, java.lang.String substring)
protected boolean evalSubstringOf(java.lang.String s)
evalSubstringOf
in class SubstringMatcher
public static Matcher<java.lang.String> endsWith(java.lang.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<java.lang.String> endsWithIgnoringCase(java.lang.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 string