Class AssertTimeout


  • class AssertTimeout
    extends java.lang.Object
    AssertTimeout is a collection of utility methods that support asserting the execution of the code under test did not take longer than the timeout duration.
    Since:
    5.0
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AssertTimeout()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void assertTimeout​(java.time.Duration timeout, Executable executable)  
      (package private) static void assertTimeout​(java.time.Duration timeout, Executable executable, java.lang.String message)  
      (package private) static void assertTimeout​(java.time.Duration timeout, Executable executable, java.util.function.Supplier<java.lang.String> messageSupplier)  
      (package private) static <T> T assertTimeout​(java.time.Duration timeout, ThrowingSupplier<T> supplier)  
      private static <T> T assertTimeout​(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.Object messageOrSupplier)  
      (package private) static <T> T assertTimeout​(java.time.Duration timeout, ThrowingSupplier<T> supplier, java.lang.String message)  
      (package private) static <T> T assertTimeout​(java.time.Duration timeout, ThrowingSupplier<T> supplier, 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

      • AssertTimeout

        private AssertTimeout()
    • Method Detail

      • assertTimeout

        static void assertTimeout​(java.time.Duration timeout,
                                  Executable executable)
      • assertTimeout

        static void assertTimeout​(java.time.Duration timeout,
                                  Executable executable,
                                  java.lang.String message)
      • assertTimeout

        static void assertTimeout​(java.time.Duration timeout,
                                  Executable executable,
                                  java.util.function.Supplier<java.lang.String> messageSupplier)
      • assertTimeout

        static <T> T assertTimeout​(java.time.Duration timeout,
                                   ThrowingSupplier<T> supplier)
      • assertTimeout

        static <T> T assertTimeout​(java.time.Duration timeout,
                                   ThrowingSupplier<T> supplier,
                                   java.lang.String message)
      • assertTimeout

        static <T> T assertTimeout​(java.time.Duration timeout,
                                   ThrowingSupplier<T> supplier,
                                   java.util.function.Supplier<java.lang.String> messageSupplier)
      • assertTimeout

        private static <T> T assertTimeout​(java.time.Duration timeout,
                                           ThrowingSupplier<T> supplier,
                                           java.lang.Object messageOrSupplier)