aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/junit/function/ThrowingRunnable.java
blob: d0eb782ccd30cfdb23014a28d1db6b9c35343338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package org.junit.function;

/**
 * This interface facilitates the use of
 * {@link org.junit.Assert#assertThrows(Class, ThrowingRunnable)} from Java 8. It allows method
 * references to void methods (that declare checked exceptions) to be passed directly into
 * {@code assertThrows}
 * without wrapping. It is not meant to be implemented directly.
 *
 * @since 4.13
 */
public interface ThrowingRunnable {
    void run() throws Throwable;
}