Package org.hamcrest
Class MatcherAssert
java.lang.Object
org.hamcrest.MatcherAssert
The Hamcrest entrypoint, static methods to check if matchers match a
given value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
assertThat
(String reason, boolean assertion) Checks that an assertion is truestatic <T> void
assertThat
(String reason, T actual, Matcher<? super T> matcher) Checks that a value matches a matcherstatic <T> void
assertThat
(T actual, Matcher<? super T> matcher) Checks that a value matches a matcher
-
Method Details
-
assertThat
Checks that a value matches a matcher- Type Parameters:
T
- the type of the value- Parameters:
actual
- the value to checkmatcher
- the matcher
-
assertThat
Checks that a value matches a matcher- Type Parameters:
T
- the type of the value- Parameters:
reason
- a description of what is being matchedactual
- the value to checkmatcher
- the matcher
-
assertThat
Checks that an assertion is true- Parameters:
reason
- a description of what is being checkedassertion
- the result of the check
-