Package jsonvalues.gen
Class JsInstantGen
java.lang.Object
jsonvalues.gen.JsInstantGen
Represents a JsInstant generator. It can be created using the static factory methods
biased
and arbitrary
or, if none of the previous suit your
needs, from a double generator and the function map:
import fun.gen.Gen;
import jsonvalues.JsInstant;
Gen<Instant> instantGen = seed -> () -> {...};
Gen<JsInstant> jsInstantGen = gen.map(JsInstant::of)
Arbitrary generators produces uniformed distributions of values. Biased generators produces, with higher probability, potential problematic values that usually cause more bugs.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a supplier from the specified seed that generates a new JsInstant each time it's calledstatic fun.gen.Gen<JsInstant>
static fun.gen.Gen<JsInstant>
arbitrary
(long min, long max) static fun.gen.Gen<JsInstant>
arbitrary
(ZonedDateTime min, ZonedDateTime max) static fun.gen.Gen<JsInstant>
biased()
static fun.gen.Gen<JsInstant>
biased
(long min, long max) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface fun.gen.Gen
map, peek, sample, sample, sample, suchThat, suchThat, then