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, toString
public boolean matchesSafely(String item)
TypeSafeMatcher
matchesSafely
in class TypeSafeMatcher<String>
public void describeTo(Description description)
SelfDescribing
description
- 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 © 2020. All rights reserved.