Use
assertEquals(double expected, double actual, double delta)
instead
Use
assertEquals(String message, double expected, double actual, double delta)
instead
use org.hamcrest.MatcherAssert.assertThat()
use org.hamcrest.MatcherAssert.assertThat()
Please use CoreMatchers.both(Matcher)
instead.
Please use CoreMatchers.containsString(String)
instead.
Please use CoreMatchers.either(Matcher)
instead.
Please use CoreMatchers.everyItem(Matcher)
instead.
Please use CoreMatchers.hasItem(Matcher)
instead.
Please use CoreMatchers.hasItem(Object)
instead.
Please use CoreMatchers.hasItems(Matcher...)
instead.
Please use CoreMatchers.hasItems(Object...)
instead.
AssertionErrors are handled by default since JUnit 4.12. Just
like in JUnit <= 4.10.
AssumptionViolatedExceptions are handled by default since
JUnit 4.12. Just like in JUnit <= 4.10.
Since 4.13
Assert.assertThrows
can be used to verify that your code throws a specific
exception.
This is used only by the Theories runner, and does not
use all the generic type info that it ought to. It will be replaced
with a forthcoming ParameterSignature#canAcceptResultOf(FrameworkMethod)
once Theories moves to junit-contrib.