public class StringEndsWith extends SubstringMatcher
substring
Constructor and Description |
---|
StringEndsWith(String substring) |
Modifier and Type | Method and Description |
---|---|
static Matcher<String> |
endsWith(String suffix)
|
protected boolean |
evalSubstringOf(String s) |
protected String |
relationship() |
describeMismatchSafely, describeTo, matchesSafely
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
public StringEndsWith(String substring)
protected boolean evalSubstringOf(String s)
evalSubstringOf
in class SubstringMatcher
protected String relationship()
relationship
in class SubstringMatcher
public 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 string