public final class IsBlankString extends TypeSafeMatcher<String>
| Modifier and Type | Method and Description |
|---|---|
static Matcher<String> |
blankOrNullString()
Creates a matcher of
String that matches when the examined string is null, or
contains zero or more whitespace characters and nothing else. |
static Matcher<String> |
blankString()
Creates a matcher of
String that matches when the examined string contains
zero or more whitespace characters and nothing else. |
void |
describeTo(Description description)
Generates a description of the object.
|
boolean |
matchesSafely(String item)
Subclasses should implement this.
|
describeMismatch, describeMismatchSafely, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toStringpublic boolean matchesSafely(String item)
TypeSafeMatchermatchesSafely in class TypeSafeMatcher<String>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static Matcher<String> blankString()
String that matches when the examined string contains
zero or more whitespace characters and nothing else.
For example:
assertThat(" ", is(blankString()))Copyright © 2021. All rights reserved.