Class AwaitilityUtils


  • public final class AwaitilityUtils
    extends Object
    Awaitility utils to make a long or repeatable operation.
    • Method Detail

      • untilIsFalse

        public static void untilIsFalse​(Callable<Boolean> supplier)
        Wait until supplier returns false.
        Parameters:
        supplier - method to return the instance.
      • untilIsTrue

        public static void untilIsTrue​(Callable<Boolean> supplier)
        Wait until supplier returns true.
        Parameters:
        supplier - method to return the instance.
      • untilIsNotNull

        public static <T> T untilIsNotNull​(Supplier<T> supplier)
        Wait until supplier returns a not null instance.
        Parameters:
        supplier - method to return the instance.
        Returns:
        the non null instance.
      • untilIsNotEmpty

        public static <T> T[] untilIsNotEmpty​(Supplier<T[]> supplier)
        Wait until supplier returns a not empty array.
        Parameters:
        supplier - method to return the instance.
        Returns:
        the non empty array.
      • untilAsserted

        public static <T> void untilAsserted​(Supplier<T> supplier,
                                             Consumer<T> asserts)
        Wait until the supplier returns an instance that satisfies the asserts.
        Parameters:
        supplier - method to return the instance.
        asserts - custom assertions that the instance must satisfy.
      • untilAsserted

        public static void untilAsserted​(org.awaitility.core.ThrowingRunnable assertion)
        Wait until the assertions are satified.
        Parameters:
        assertion - custom assertions that the instance must satisfy.
      • until

        public static <T> T until​(Supplier<T> supplier,
                                  org.hamcrest.Matcher<T> matcher)