Kotest Arrow Generators

Kotest provides an optional module that provides generators for Arrow.

Kotest provides an optional module that provides generators for Arrow.

Either Description
Arb.either(arbL, arbR) Generates roughly 50/50 left and right values from the underlying generators.
Arb.right(arb) Generates instances of Either.Right using the given arb.
Arb.left(arb) Generates instances of Either.Left using the given arb.
NonEmptyList Description
Arb.nel(arb) Generates NonEmptyList instances with a randomly selected size between 1 and 100, filled with elements from the given arb.
Arb.nel(arb, range) Generates NonEmptyList instances with a randomly selected size from the given range, filled with elements from the given arb.
Option
Exhaustive.option(a) Returns an Exhaustive containing None and Some of the given value.
Exhaustive.none(a) Returns an Exhaustive containing None.
Arb.option(arb) Generates both None and Some values filled with values from the given arb.
Arb.some(arb) Generates Some values filled with values from the given arb.
Arb.none() A constant arb that returns None. It is the same as Exhaustive.None and is provided only for cases that require an Arb.
Endo Description
Arb.endo(arb) Wraps values from the underlying arb in Endo instances.
Eval Description
Arb<A>.evalNow() Wraps receiver values with Eval.now.
Validated Description
Arb.validated(invalid, valid) Generates valid and invalid Validated instances roughly 50/50 using the arbs provided for values.
Arb.validatedNel(invalid, valid) Generates valid and invalid ValidatedNel instances roughly 50/50 using the arbs provided for values.

References