org.apache.commons.math.random
Class ValueServerTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.math.RetryTestCase
              extended by org.apache.commons.math.random.ValueServerTest
All Implemented Interfaces:
junit.framework.Test

public final class ValueServerTest
extends RetryTestCase

Test cases for the ValueServer class.

Version:
$Revision: 764749 $ $Date: 2009-04-14 07:51:40 -0400 (Tue, 14 Apr 2009) $

Constructor Summary
ValueServerTest(String name)
           
 
Method Summary
 void setUp()
           
static junit.framework.Test suite()
           
 void testEmptyDigestFile()
           
 void testEmptyReplayFile()
           
 void testFill()
          Test fill
 void testModes()
          Test other ValueServer modes
 void testNextDigest()
          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.
 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.
Check that the values 1,2,1001,1002 match data file values 1 and 2.
 
Methods inherited from class org.apache.commons.math.RetryTestCase
runTest
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueServerTest

public ValueServerTest(String name)
Method Detail

setUp

public void setUp()
Overrides:
setUp in class junit.framework.TestCase

suite

public static junit.framework.Test suite()

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

testNextDigestFail

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

Throws:
Exception

testEmptyReplayFile

public void testEmptyReplayFile()

testEmptyDigestFile

public void testEmptyDigestFile()

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-2009 Apache Software Foundation. All Rights Reserved.