Top Description Constructors Methods
org.junit.jupiter.api

pack-priv Class AssertInstanceOf

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

AssertInstanceOf is a collection of utility methods that support asserting that an object is of an expected type — in other words, if it can be assigned to the expected type.
Since
5.8

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static <T> T
assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue)

pack-priv static <T> T
assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, @Nullable String message)

pack-priv static <T> T
assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, Supplier<@Nullable String> messageSupplier)

private static <T> T
assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, @Nullable Object messageOrSupplier)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AssertInstanceOfback to summary
private AssertInstanceOf()

Method Detail

assertInstanceOfback to summary
pack-priv static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue)
Annotations
@Contract:_, null -> fail
assertInstanceOfback to summary
pack-priv static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, @Nullable String message)
Annotations
@Contract:_, null, _ -> fail
assertInstanceOfback to summary
pack-priv static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, Supplier<@Nullable String> messageSupplier)
Annotations
@Contract:_, null, _ -> fail
assertInstanceOfback to summary
private static <T> T assertInstanceOf(Class<T> expectedType, @Nullable Object actualValue, @Nullable Object messageOrSupplier)
Annotations
@SuppressWarnings:NullAway