Interface Arbitrary<T>

Type Parameters:
T - the type of the property
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@ExperimentalApi @FunctionalInterface public interface Arbitrary<T>
An extension point that allows providing a custom implementation strategy to generate samples for a property under the test.
Since:
3.6.0
  • Method Details

    • generator

      ArbitraryGenerator<T> generator()
      Returns the generator instance of a property under the test
      Returns:
      the generator instance
      Since:
      3.6.0
    • fromStream

      static <A> Arbitrary<A> fromStream(BaseStream<A,?> stream)
      Creates the Arbitrary instance from the BaseStream instance.
      Type Parameters:
      A - the type of the property
      Parameters:
      stream - the source BaseStream instance
      Returns:
      an Arbitrary instance
      Since:
      3.6.0