| Package | Description |
|---|---|
| org.junit |
Provides JUnit core classes and annotations.
|
| org.junit.rules |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Throwable> |
Assert.assertThrows(Class<T> expectedThrowable,
ThrowingRunnable runnable)
Asserts that
runnable throws an exception of type expectedThrowable when
executed. |
static <T extends Throwable> |
Assert.assertThrows(String message,
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(Class<? extends Throwable> expectedThrowable,
ThrowingRunnable runnable)
Adds a failure to the table if
runnable does not throw an
exception of type expectedThrowable when executed. |
Copyright © 2002–2020 JUnit. All rights reserved.