Top Description Constructors Methods
org.junit.jupiter.api

pack-priv Class AssertThrows

extends Object
Class Inheritance
Static Imports
org.junit.jupiter.api.AssertionFailureBuilder.assertionFailure, .AssertionUtils.getCanonicalName

AssertThrows is a collection of utility methods that support asserting an exception of an expected type is thrown.
Since
5.0

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T extends Throwable> T
assertThrows(Class<T> expectedType, Executable executable)

pack-priv static <T extends Throwable> T
assertThrows(Class<T> expectedType, Executable executable, @Nullable String message)

pack-priv static <T extends Throwable> T
assertThrows(Class<T> expectedType, Executable executable, Supplier<@Nullable String> messageSupplier)

private static <T extends Throwable> T
assertThrows(Class<T> expectedType, Executable executable, @Nullable Object messageOrSupplier)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AssertThrowsback to summary
private AssertThrows()

Method Detail

assertThrowsback to summary
pack-priv static <T extends Throwable> T assertThrows(Class<T> expectedType, Executable executable)
assertThrowsback to summary
pack-priv static <T extends Throwable> T assertThrows(Class<T> expectedType, Executable executable, @Nullable String message)
assertThrowsback to summary
pack-priv static <T extends Throwable> T assertThrows(Class<T> expectedType, Executable executable, Supplier<@Nullable String> messageSupplier)
assertThrowsback to summary
private static <T extends Throwable> T assertThrows(Class<T> expectedType, Executable executable, @Nullable Object messageOrSupplier)
Annotations
@SuppressWarnings:unchecked