|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.quickcheck.generator.distribution.RandomConfiguration
public final class RandomConfiguration
The RandomConfiguration
allows to get and set the seed of the random
number generator.
Setting the seed allows to run test deterministically with the same generated
objects. The setSeed(long)
method can be used for that.
An the other hand the initSeed()
method sets a new random seed and
return it. This allows to generate random test objects in one run and repeat
the same test by setting the seed with setSeed(long)
.
You can set the seed for the JVM with SEED_SYSTEM_PROPERTY
. This
system property will be evaluated at start up. Calling setSeed(long)
will overwrite this setting.
Field Summary | |
---|---|
static String |
SEED_SYSTEM_PROPERTY
System property ("net.java.quickcheck.seed") to set the long seed value for the random number generator. |
Method Summary | |
---|---|
static long |
initSeed()
|
static void |
setSeed(long seed)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SEED_SYSTEM_PROPERTY
long
seed value for the random number generator.
Note: The actual values generated by the RNG still depend on the execution order. That may be not under the control of quickcheck.
Method Detail |
---|
public static long initSeed()
public static void setSeed(long seed)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |