| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | describeTo(Description
The description to be built or appended to. description)Implements org. |
| public boolean | matches(Object
the object against which the matcher is evaluated. o)Implements org. |
| public static Matcher | |
| public static <T> Matcher | notNullValue(Class<T>
dummy parameter used to infer the generic type of the returned matcher type)A shortcut to the frequently used |
| public static Matcher | |
| public static <T> Matcher |
| IsNull | back to summary |
|---|---|
| public IsNull() | |
| describeTo | back to summary |
|---|---|
| public void describeTo(Description description) Implements org. Doc from org. Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.
| |
| matches | back to summary |
|---|---|
| public boolean matches(Object o) Implements org. Doc from org. Evaluates the matcher for argument item. This method matches against Object, instead of the generic type T. This is because the caller of the Matcher does not know at runtime what the type is (because of type erasure with Java generics). It is down to the implementations to check the correct type. | |
| notNullValue | back to summary |
|---|---|
| public static Matcher A shortcut to the frequently used For example: assertThat(cheese, is(notNullValue()))instead of: assertThat(cheese, is(not(nullValue())))
| |
| notNullValue | back to summary |
|---|---|
| public static <T> Matcher A shortcut to the frequently used For example: assertThat(cheese, is(notNullValue(X.class)))instead of: assertThat(cheese, is(not(nullValue(X.class)))) | |
| nullValue | back to summary |
|---|---|
| public static Matcher Creates a matcher that matches if examined object is For example: assertThat(cheese, is(nullValue())
| |
| nullValue | back to summary |
|---|---|
| public static <T> Matcher Creates a matcher that matches if examined object is For example: assertThat(cheese, is(nullValue(Cheese.class)) | |