Uses of Interface
io.vavr.test.Gen

Packages that use Gen
Package
Description
A property check framework built around Property which integrates well with unit test frameworks like junit.
  • Uses of Gen in io.vavr.test

    Methods in io.vavr.test that return Gen
    Modifier and Type
    Method
    Description
    Arbitrary.apply(int size)
    Returns a generator for objects of type T.
    static Gen<Character>
    Gen.choose(char... characters)
    Chooses a char from all chars in the array
    static Gen<Character>
    Gen.choose(char min, char max)
    Chooses a char between min and max, bounds inclusive and chars distributed according to the underlying random number generator.
    static Gen<Double>
    Gen.choose(double min, double max)
    Chooses a double between min and max, bounds inclusive and numbers distributed according to the distribution of the underlying random number generator.
    static Gen<Integer>
    Gen.choose(int min, int max)
    Chooses an int between min and max, bounds inclusive and numbers distributed according to the distribution of the underlying random number generator.
    static Gen<Long>
    Gen.choose(long min, long max)
    Chooses a long between min and max, bounds inclusive and numbers distributed according to the distribution of the underlying random number generator.
    static <T extends Enum<T>>
    Gen<T>
    Gen.choose(Class<T> clazz)
    Chooses an enum value from all the enum constants defined in the enumerated type.
    static <T> Gen<T>
    Gen.choose(Iterable<T> values)
    Chooses a value from all values in the iterable
    static <T> Gen<T>
    Gen.choose(T... values)
    Chooses a value from all values in the array.
    static <T> Gen<T>
    Gen.fail()
    A failing generator which throws a RuntimeException("failed").
    static <T> Gen<T>
    Gen.fail(String message)
    A failing generator which throws a RuntimeException.
    default Gen<T>
    Gen.filter(Predicate<? super T> predicate)
    Returns a generator based on this generator which produces values that fulfill the given predicate.
    default <U> Gen<U>
    Gen.flatMap(Function<? super T,? extends Gen<? extends U>> mapper)
    Maps generated Ts to Us.
    static <T> Gen<T>
    Gen.frequency(Tuple2<Integer,Gen<T>>... generators)
    Chooses one of the given generators according to their frequency.
    static <T> Gen<T>
    Gen.frequency(Iterable<Tuple2<Integer,Gen<T>>> generators)
    Chooses one of the given generators according to their frequency.
    static <T> Gen<T>
    GenModule.frequency(int n, Iterator<Tuple2<Integer,Gen<T>>> iter)
    Chooses a Gen according to the given frequencies.
    default Gen<T>
    Gen.intersperse(Gen<T> other)
    Intersperse values from this generator instance with those of another.
    default <U> Gen<U>
    Gen.map(Function<? super T,? extends U> mapper)
    Maps generated Ts to Us.
    static <T> Gen<T>
    Gen.of(T t)
    A generator which constantly returns t.
    static <T> Gen<T>
    Gen.of(T seed, Function<? super T,? extends T> next)
     
    static <T> Gen<T>
    Gen.oneOf(Gen<T>... generators)
    Randomly chooses one of the given generators.
    static <T> Gen<T>
    Gen.oneOf(Iterable<Gen<T>> generators)
    Randomly chooses one of the given generators.
    default Gen<T>
    Gen.peek(Consumer<? super T> action)
     
    Methods in io.vavr.test with parameters of type Gen
    Modifier and Type
    Method
    Description
    default Gen<T>
    Gen.intersperse(Gen<T> other)
    Intersperse values from this generator instance with those of another.
    static <U> Arbitrary<U>
    Arbitrary.ofAll(Gen<U> generator)
    Generates an arbitrary value from a given generator
    static <T> Gen<T>
    Gen.oneOf(Gen<T>... generators)
    Randomly chooses one of the given generators.
    Arbitrary.string(Gen<Character> gen)
    Generates arbitrary strings based on a given alphabet represented by gen.
    Method parameters in io.vavr.test with type arguments of type Gen
    Modifier and Type
    Method
    Description
    default <U> Gen<U>
    Gen.flatMap(Function<? super T,? extends Gen<? extends U>> mapper)
    Maps generated Ts to Us.
    static <T> Gen<T>
    Gen.frequency(Iterable<Tuple2<Integer,Gen<T>>> generators)
    Chooses one of the given generators according to their frequency.
    static <T> Gen<T>
    GenModule.frequency(int n, Iterator<Tuple2<Integer,Gen<T>>> iter)
    Chooses a Gen according to the given frequencies.
    static <T> Gen<T>
    Gen.oneOf(Iterable<Gen<T>> generators)
    Randomly chooses one of the given generators.
    default <U> U
    Gen.transform(Function<? super Gen<T>,? extends U> f)
    Transforms this Gen.