public class ArgumentMatchers extends Object
Modifier and Type | Method and Description |
---|---|
static <T> org.hamcrest.Matcher<T> |
named(String name,
org.hamcrest.Matcher<T> matcher)
Wraps an existing matcher, decorating its description with the name specified.
|
static org.hamcrest.Matcher<String> |
notEmptyString()
A matcher matching non-null and non-empty strings
Example:
assertThat("this is not an empty string", notEmptyString())
|
public static <T> org.hamcrest.Matcher<T> named(String name, org.hamcrest.Matcher<T> matcher)
named("theNameOfMyArgument", notNullValue())
T
- the type of object to matchname
- the given name of the wrapped matchermatcher
- the matcher to decorate with a namepublic static org.hamcrest.Matcher<String> notEmptyString()
assertThat("this is not an empty string", notEmptyString())
Copyright © 2014–2015 valid4j. All rights reserved.