Class AssertThrowsExactly


  • class AssertThrowsExactly
    extends java.lang.Object
    AssertThrowsExactly is a collection of utility methods that support asserting an exception of an exact type is thrown.
    Since:
    5.8
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AssertThrowsExactly()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static <T extends java.lang.Throwable>
      T
      assertThrowsExactly​(java.lang.Class<T> expectedType, Executable executable)  
      private static <T extends java.lang.Throwable>
      T
      assertThrowsExactly​(java.lang.Class<T> expectedType, Executable executable, java.lang.Object messageOrSupplier)  
      (package private) static <T extends java.lang.Throwable>
      T
      assertThrowsExactly​(java.lang.Class<T> expectedType, Executable executable, java.lang.String message)  
      (package private) static <T extends java.lang.Throwable>
      T
      assertThrowsExactly​(java.lang.Class<T> expectedType, Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AssertThrowsExactly

        private AssertThrowsExactly()
    • Method Detail

      • assertThrowsExactly

        static <T extends java.lang.Throwable> T assertThrowsExactly​(java.lang.Class<T> expectedType,
                                                                     Executable executable)
      • assertThrowsExactly

        static <T extends java.lang.Throwable> T assertThrowsExactly​(java.lang.Class<T> expectedType,
                                                                     Executable executable,
                                                                     java.lang.String message)
      • assertThrowsExactly

        static <T extends java.lang.Throwable> T assertThrowsExactly​(java.lang.Class<T> expectedType,
                                                                     Executable executable,
                                                                     java.util.function.Supplier<java.lang.String> messageSupplier)
      • assertThrowsExactly

        private static <T extends java.lang.Throwable> T assertThrowsExactly​(java.lang.Class<T> expectedType,
                                                                             Executable executable,
                                                                             java.lang.Object messageOrSupplier)