All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.junit.function.ThrowingRunnable Maven / Gradle / Ivy

Go to download

JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.

There is a newer version: 4.13.2
Show newest version
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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy