public class Matchers extends Object
| Constructor and Description |
|---|
Matchers() |
| Modifier and Type | Method and Description |
|---|---|
static <T> org.hamcrest.Matcher<T> |
equalTo(T operand) |
static <T> org.hamcrest.Matcher<T> |
is(Class<T> param1) |
static <T> org.hamcrest.Matcher<T> |
is(org.hamcrest.Matcher<T> param1) |
static <T> org.hamcrest.Matcher<T> |
is(T param1) |
static <T> org.hamcrest.Matcher<T> |
not(T operand) |
static org.hamcrest.Matcher<Object> |
notNullValue()
A shortcut to the frequently used
not(nullValue()). |
static org.hamcrest.Matcher<Object> |
nullValue()
Creates a matcher that matches if examined object is
null. |
public static <T> org.hamcrest.Matcher<T> is(T param1)
public static <T> org.hamcrest.Matcher<T> is(Class<T> param1)
public static <T> org.hamcrest.Matcher<T> is(org.hamcrest.Matcher<T> param1)
public static <T> org.hamcrest.Matcher<T> equalTo(T operand)
public static <T> org.hamcrest.Matcher<T> not(T operand)
public static org.hamcrest.Matcher<Object> nullValue()
null.
For example:
assertThat(cheese, is(nullValue())
public static org.hamcrest.Matcher<Object> notNullValue()
not(nullValue()).
For example:
assertThat(cheese, is(notNullValue()))instead of:
assertThat(cheese, is(not(nullValue())))
Copyright © 2019. All rights reserved.