org.hamcrest.core
Class StringEndsWith
java.lang.Object
   org.hamcrest.BaseMatcher<T>
org.hamcrest.BaseMatcher<T>
       org.hamcrest.TypeSafeMatcher<String>
org.hamcrest.TypeSafeMatcher<String>
           org.hamcrest.core.SubstringMatcher
org.hamcrest.core.SubstringMatcher
               org.hamcrest.core.StringEndsWith
org.hamcrest.core.StringEndsWith
- All Implemented Interfaces: 
- Matcher<String>, SelfDescribing
- public class StringEndsWith 
- extends SubstringMatcher
Tests if the argument is a string that contains a substring.
 
 
 
 
 
 
 
 
StringEndsWith
public StringEndsWith(String substring)
evalSubstringOf
protected boolean evalSubstringOf(String s)
- 
- Specified by:
- evalSubstringOfin class- SubstringMatcher
 
- 
 
relationship
protected String relationship()
- 
- Specified by:
- relationshipin class- SubstringMatcher
 
- 
 
endsWith
public static Matcher<String> endsWith(String suffix)
- Creates a matcher that matches if the examined Stringends with the specifiedString.
 
 For example:assertThat("myStringOfNote", endsWith("Note"))
 
- 
- Parameters:
- suffix- the substring that the returned matcher will expect at the end of any examined string