Class StringEndsWith
java.lang.Object
org.hamcrest.BaseMatcher<String>
org.hamcrest.TypeSafeMatcher<String>
org.hamcrest.core.SubstringMatcher
org.hamcrest.core.StringEndsWith
- All Implemented Interfaces:
Matcher<String>, SelfDescribing
Tests if the argument is a string that ends with a specific substring.
-
Field Summary
Fields inherited from class SubstringMatcher
substring -
Constructor Summary
ConstructorsConstructorDescriptionStringEndsWith(boolean ignoringCase, String substring) StringEndsWith(String substring) -
Method Summary
Methods inherited from class SubstringMatcher
converted, describeMismatchSafely, describeTo, matchesSafelyMethods inherited from class TypeSafeMatcher
describeMismatch, matchesMethods inherited from class BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Constructor Details
-
StringEndsWith
-
StringEndsWith
-
-
Method Details
-
evalSubstringOf
- Specified by:
evalSubstringOfin classSubstringMatcher
-
endsWith
-
endsWithIgnoringCase
Creates a matcher that matches if the examinedStringends with the specifiedString, ignoring case. For example:assertThat("myStringOfNote", endsWithIgnoringCase("note"))- Parameters:
suffix- the substring that the returned matcher will expect at the end of any examined string- Returns:
- The matcher.
-