net.java.quickcheck.generator.distribution
Class RandomConfiguration

java.lang.Object
  extended by net.java.quickcheck.generator.distribution.RandomConfiguration

public final class RandomConfiguration
extends Object

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

SEED_SYSTEM_PROPERTY

public static final String SEED_SYSTEM_PROPERTY
System property ("net.java.quickcheck.seed") to set the 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.

See Also:
Constant Field Values
Method Detail

initSeed

public static long initSeed()

setSeed

public static void setSeed(long seed)


Copyright © 2011. All Rights Reserved.