org.apache.commons.math3.random
Class ValueServerTest

java.lang.Object
  extended by org.apache.commons.math3.random.ValueServerTest

public final class ValueServerTest
extends Object

Test cases for the ValueServer class.

Version:
$Id: ValueServerTest.java 1425978 2012-12-26 18:19:30Z psteitz $

Constructor Summary
ValueServerTest()
           
 
Method Summary
 void setUp()
           
 void testEmptyDigestFile()
           
 void testEmptyReplayFile()
           
 void testFill()
          Test fill
 void testFixedSeed()
          Verify that when provided with fixed seeds, stochastic modes generate fixed sequences.
 void testModes()
          Test other ValueServer modes
 void testNextDigest()
          Generate 1000 random values and make sure they look OK.
 void testNextDigestFail()
          Make sure exception thrown if digest getNext is attempted before loading empiricalDistribution.
 void testProperties()
          Test getters to make Clover happy
 void testReplay()
          Test ValueServer REPLAY_MODE using values in testData file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueServerTest

public ValueServerTest()
Method Detail

setUp

public void setUp()

testNextDigest

public void testNextDigest()
                    throws Exception
Generate 1000 random values and make sure they look OK.
Note that there is a non-zero (but very small) probability that these tests will fail even if the code is working as designed.

Throws:
Exception

testFixedSeed

public void testFixedSeed()
                   throws Exception
Verify that when provided with fixed seeds, stochastic modes generate fixed sequences. Verifies the fix for MATH-654.

Throws:
Exception

testNextDigestFail

public void testNextDigestFail()
                        throws Exception
Make sure exception thrown if digest getNext is attempted before loading empiricalDistribution.

Throws:
Exception

testEmptyReplayFile

public void testEmptyReplayFile()
                         throws Exception
Throws:
Exception

testEmptyDigestFile

public void testEmptyDigestFile()
                         throws Exception
Throws:
Exception

testReplay

public void testReplay()
                throws Exception
Test ValueServer REPLAY_MODE using values in testData file.
Check that the values 1,2,1001,1002 match data file values 1 and 2. the sample data file.

Throws:
Exception

testModes

public void testModes()
               throws Exception
Test other ValueServer modes

Throws:
Exception

testFill

public void testFill()
              throws Exception
Test fill

Throws:
Exception

testProperties

public void testProperties()
                    throws Exception
Test getters to make Clover happy

Throws:
Exception


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.