public class StringStartsWith extends SubstringMatcher
substring| Constructor and Description |
|---|
StringStartsWith(java.lang.String substring) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
evalSubstringOf(java.lang.String s) |
protected java.lang.String |
relationship() |
static Matcher<java.lang.String> |
startsWith(java.lang.String prefix)
Creates a matcher that matches if the examined
String starts with the specified
String. |
describeMismatchSafely, describeTo, matchesSafelydescribeMismatch, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringprotected boolean evalSubstringOf(java.lang.String s)
evalSubstringOf in class SubstringMatcherprotected java.lang.String relationship()
relationship in class SubstringMatcherpublic static Matcher<java.lang.String> startsWith(java.lang.String prefix)
String starts with the specified
String.
For example:
assertThat("myStringOfNote", startsWith("my"))prefix - the substring that the returned matcher will expect at the start of any examined string