Class AssertInstanceOf

java.lang.Object
org.junit.jupiter.api.AssertInstanceOf

class AssertInstanceOf extends Object
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 Details

    • AssertInstanceOf

      private AssertInstanceOf()
  • Method Details

    • assertInstanceOf

      static <T> T assertInstanceOf(Class<T> expectedType, Object actualValue)
    • assertInstanceOf

      static <T> T assertInstanceOf(Class<T> expectedType, Object actualValue, String message)
    • assertInstanceOf

      static <T> T assertInstanceOf(Class<T> expectedType, Object actualValue, Supplier<String> messageSupplier)
    • assertInstanceOf

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