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 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)
      • assertTimeoutPreemptively

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

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

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

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

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

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

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