public abstract class MatcherAssertionErrors
extends java.lang.Object
org.hamcrest.MatcherAssert
that removes the need to
depend on "hamcrest-all" when using Hamcrest 1.1 and also maintains backward
compatibility with Hamcrest 1.1 (also embedded in JUnit 4.4 through 4.8).Modifier and Type | Field and Description |
---|---|
private static java.lang.reflect.Method |
describeMismatchMethod |
Modifier | Constructor and Description |
---|---|
private |
MatcherAssertionErrors() |
Modifier and Type | Method and Description |
---|---|
static <T> void |
assertThat(java.lang.String reason,
T actual,
<any> matcher)
Asserts that the given matcher matches the actual value.
|
static <T> void |
assertThat(T actual,
<any> matcher)
Asserts that the given matcher matches the actual value.
|
private static final java.lang.reflect.Method describeMismatchMethod
public static <T> void assertThat(T actual, <any> matcher)
T
- the static type accepted by the matcheractual
- the value to match againstmatcher
- the matcherpublic static <T> void assertThat(java.lang.String reason, T actual, <any> matcher)
T
- the static type accepted by the matcherreason
- additional information about the erroractual
- the value to match againstmatcher
- the matcher