public class MatcherAssert extends Object
MatcherAssert. If the matcher doesn't match, uses
ResultComparison#containsComparableJson(Description) to determine if a ComparisonFailure should be
thrown. The exception is thrown instead of AssertionError, so that IDE like eclipse and IntelliJ can display a
pop-up window highlighting the String differences.| Constructor and Description |
|---|
MatcherAssert() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
assertThat(String reason,
T actual,
org.hamcrest.Matcher<? super T> matcher)
Checks if the object matches the condition defined by the matcher provided.
|
static <T> void |
assertThat(T actual,
org.hamcrest.Matcher<? super T> matcher) |
public static <T> void assertThat(T actual,
org.hamcrest.Matcher<? super T> matcher)
MatcherAssert.assertThat(Object, Matcher)public static <T> void assertThat(String reason, T actual, org.hamcrest.Matcher<? super T> matcher)
reason - describes the assertionactual - the object that will be matched against the matchermatcher - defines the condition the object have to fulfill in order to matchCopyright © 2015. All Rights Reserved.