@API(value=Internal)
public class ThrowableCollector
extends java.lang.Object
Throwable.| Constructor and Description |
|---|
ThrowableCollector() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertEmpty()
Assert that this
ThrowableCollector is empty (i.e.,
has not collected any Throwables). |
void |
execute(org.junit.gen5.api.Executable executable)
|
public void execute(org.junit.gen5.api.Executable executable)
executable - the Executable to executeadd(Throwable),
getThrowables(),
assertEmpty()public void assertEmpty()
ThrowableCollector is empty (i.e.,
has not collected any Throwables).
If this collector is not empty, the first collected Throwable
will be thrown with any additional throwables
suppressed in the
first Throwable. Note, however, that the Throwable
will not be wrapped. Rather, it will be
masked
as an unchecked exception.
ExceptionUtils.throwAsUncheckedException(Throwable)