Creates an Arbitrary instance
Arbitrary AnyVal
Arbitrary instance of any array.
Arbitrary BigDecimal
Arbitrary BigInt
Arbitrary instance of Boolean
Arbitrary instance of Byte
Arbitrary instance of Char
Arbitrary instance of any buildable container (such as lists, arrays, streams, etc).
Arbitrary instance of any buildable container (such as lists, arrays, streams, etc). The maximum size of the container depends on the size generation parameter.
Arbitrary instance of Date
Arbitrary instance of Double
Arbitrary instance of Float
Arbitrary instance of Function1
Arbitrary instance of Function2
Arbitrary instance of Function3
Arbitrary instance of Function4
Arbitrary instance of Function5
Arbitrary instance of Gen
Arbitrary instance of gen params
Arbitrary instance of immutable map
Arbitrary instance of Int
Arbitrary instance of Long
Arbitrary instance of mutable map
Arbitrary java.
Arbitrary java.lang.Number
Arbitrary instance of option type
Generates an arbitrary property
Arbitrary instance of prop params
Arbitrary instance of Short
Arbitrary instance of String
Arbitrary instance of test parameters
Arbitrary instance of Throwable
Arbitrary instance of 2-tuple
Arbitrary instance of 3-tuple
Arbitrary instance of 4-tuple
Arbitrary instance of 5-tuple
Arbitrary instance of 6-tuple
Arbitrary instance of 7-tuple
Arbitrary instance of 8-tuple
Arbitrary instance of 9-tuple
Absolutely, totally, 100% arbitrarily chosen Unit.
Returns an arbitrary generator for the type T.
Defines implicit
Arbitraryinstances for common types.ScalaCheck uses implicit
Arbitraryinstances when creating properties out of functions with theProp.propertymethod, and when theArbitrary.arbitrarymethod is used. For example, the following code requires that there exists an implicitArbitrary[MyClass]instance:val myProp = Prop.forAll { myClass: MyClass =>The required implicit definition could look like this:...
}
val myGen = Arbitrary.arbitrary[MyClass]
implicit val arbMyClass: Arbitrary[MyClass] = Arbitrary(...)The factory methodArbitrary(...)takes a generator of typeGen[T]and returns an instance ofArbitrary[T]. TheArbitrarymodule defines implicitArbitraryinstances for common types, for convenient use in your properties and generators.