Package io.vavr.test

Interface Checkable

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEFAULT_SIZE
      Default size hint for generators: 100
      static int DEFAULT_TRIES
      Default tries to check a property: 1000
      static java.util.function.Supplier<java.util.Random> RNG
      A thread-safe, equally distributed random number generator.
    • Field Detail

      • RNG

        static final java.util.function.Supplier<java.util.Random> RNG
        A thread-safe, equally distributed random number generator.
      • DEFAULT_SIZE

        static final int DEFAULT_SIZE
        Default size hint for generators: 100
        See Also:
        Constant Field Values
      • DEFAULT_TRIES

        static final int DEFAULT_TRIES
        Default tries to check a property: 1000
        See Also:
        Constant Field Values
    • Method Detail

      • check

        CheckResult check​(java.util.Random randomNumberGenerator,
                          int size,
                          int tries)
        Checks this property.
        Parameters:
        randomNumberGenerator - An implementation of Random.
        size - A (not necessarily positive) size hint.
        tries - A non-negative number of tries to falsify the given property.
        Returns:
        A CheckResult
      • check

        default CheckResult check​(int size,
                                  int tries)
        Checks this property using the default random number generator RNG.
        Parameters:
        size - A (not necessarily positive) size hint.
        tries - A non-negative number of tries to falsify the given property.
        Returns:
        A CheckResult
      • and

        default Checkable and​(Checkable checkable)
        Returns a new Checkable which is satisfied if this Checkable and the given checkable are satisfied.

        First this Checkable is checked.

        Parameters:
        checkable - A Checkable
        Returns:
        A new Checkable
      • or

        default Checkable or​(Checkable checkable)
        Returns a new Checkable which is satisfied if this Checkable or the given checkable are satisfied.

        First this Checkable is checked.

        Parameters:
        checkable - A Checkable
        Returns:
        A new Checkable