assertThat
Deprecated
use {@code MatcherAssert.assertThat()}
Asserts that actual satisfies the condition specified by matcher. If not, an AssertionError is thrown with information about the matcher and failing value. Example:
assertThat(0, is(1)); // fails: // failure message: // expected: is <1> // got value: <0> assertThat(0, is(not(1))) // passes*
Matcher does not currently document the meaning of its type parameter T. This method assumes that a matcher typed as Matcher<T> can be meaningfully applied only to values that could be assigned to a variable of type T.
Parameters
the computed value being compared
an expression, built of Matchers, specifying allowed values
See also
Deprecated
use {@code MatcherAssert.assertThat()}
Asserts that actual satisfies the condition specified by matcher. If not, an AssertionError is thrown with the reason and information about the matcher and failing value. Example:
assertThat("Help! Integers don't work", 0, is(1)); // fails:
// failure message:
// Help! Integers don't work
// expected: is <1>
// got value: <0>
assertThat("Zero is one", 0, is(not(1))) // passes
*Matcher does not currently document the meaning of its type parameter T. This method assumes that a matcher typed as Matcher<T> can be meaningfully applied only to values that could be assigned to a variable of type T.
Parameters
additional information about the error
the computed value being compared
an expression, built of Matchers, specifying allowed values