Package | Description |
---|---|
org.junit |
Provides JUnit core classes and annotations.
|
org.junit.rules |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.Throwable> |
Assert.assertThrows(java.lang.Class<T> expectedThrowable,
ThrowingRunnable runnable)
Asserts that
runnable throws an exception of type expectedThrowable when
executed. |
static <T extends java.lang.Throwable> |
Assert.assertThrows(java.lang.String message,
java.lang.Class<T> expectedThrowable,
ThrowingRunnable runnable)
Asserts that
runnable throws an exception of type expectedThrowable when
executed. |
Modifier and Type | Method and Description |
---|---|
void |
ErrorCollector.checkThrows(java.lang.Class<? extends java.lang.Throwable> expectedThrowable,
ThrowingRunnable runnable)
Adds a failure to the table if
runnable does not throw an
exception of type expectedThrowable when executed. |