类 StringEndsWith
- java.lang.Object
- org.hamcrest.BaseMatcher<T>
- org.hamcrest.TypeSafeMatcher<String>
- org.hamcrest.core.SubstringMatcher
- org.hamcrest.core.StringEndsWith
- 所有已实现的接口:
Matcher<String>,SelfDescribing
public class StringEndsWith extends SubstringMatcher
Tests if the argument is a string that contains a substring.
字段概要
从类继承的字段 org.hamcrest.core.SubstringMatcher
substring
构造器概要
构造器 构造器 说明 StringEndsWith(String substring)
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static Matcher<String>endsWith(String suffix)protected booleanevalSubstringOf(String s)protected Stringrelationship()从类继承的方法 org.hamcrest.core.SubstringMatcher
describeMismatchSafely, describeTo, matchesSafely
从类继承的方法 org.hamcrest.TypeSafeMatcher
describeMismatch, matches
从类继承的方法 org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
构造器详细资料
StringEndsWith
public StringEndsWith(String substring)
方法详细资料
evalSubstringOf
protected boolean evalSubstringOf(String s)
- 指定者:
evalSubstringOf在类中SubstringMatcher
relationship
protected String relationship()
- 指定者:
relationship在类中SubstringMatcher
endsWith
public static Matcher<String> endsWith(String suffix)
Creates a matcher that matches if the examinedStringends with the specifiedString. For example:assertThat("myStringOfNote", endsWith("Note"))- 参数:
suffix- the substring that the returned matcher will expect at the end of any examined string