Methods in org.junit.rules that return ExpectedException |
ExpectedException |
ExpectedException.handleAssertionErrors()
Deprecated. AssertionErrors are handled by default since JUnit 4.12. Just
like in JUnit <= 4.10. |
ExpectedException |
ExpectedException.handleAssumptionViolatedExceptions()
Deprecated. AssumptionViolatedExceptions are handled by default since
JUnit 4.12. Just like in JUnit <= 4.10. |
static ExpectedException |
ExpectedException.none()
Deprecated. Since 4.13
Assert.assertThrows can be used to verify that your code throws a specific
exception. |
ExpectedException |
ExpectedException.reportMissingExceptionWithMessage(String message)
Specifies the failure message for tests that are expected to throw
an exception but do not throw any. |