use of org.llorllale.cactoos.matchers.Throws in project cactoos by yegor256.
the class IoCheckedProcTest method rethrowsIoException.
@Test
void rethrowsIoException() {
final IOException exception = new IOException("intended");
new Assertion<>("Must rethrow original IOException", () -> {
new IoCheckedProc<>((Proc<Integer>) i -> {
throw exception;
}).exec(1);
return null;
}, new Throws<>(exception.getMessage(), exception.getClass())).affirm();
}
Aggregations