|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.math.RetryTestCase
org.apache.commons.math.random.EmpiricalDistributionTest
public final class EmpiricalDistributionTest
Test cases for the EmpiricalDistribution class
Field Summary | |
---|---|
protected double[] |
dataArray
|
protected org.apache.commons.math.random.EmpiricalDistribution |
empiricalDistribution
|
protected org.apache.commons.math.random.EmpiricalDistribution |
empiricalDistribution2
|
protected File |
file
|
protected URL |
url
|
Constructor Summary | |
---|---|
EmpiricalDistributionTest(String name)
|
Method Summary | |
---|---|
void |
setUp()
|
static junit.framework.Test |
suite()
|
void |
testBinIndexOverflow()
Test bin index overflow problem (BZ 36450) |
void |
testDoubleLoad()
Test EmpiricalDistrbution.load(double[]) using data taken from sample data file. Check that the sampleCount, mu and sigma match data in the sample data file. |
void |
testGridTooFat()
How about too fat? |
void |
testGridTooFine()
Make sure we can handle a grid size that is too fine |
void |
testLoad()
Test EmpiricalDistrbution.load() using sample data file. Check that the sampleCount, mu and sigma match data in the sample data file. |
void |
testLoadNullDoubleArray()
|
void |
testLoadNullFile()
|
void |
testLoadNullURL()
|
void |
testNexFail()
Make sure exception thrown if digest getNext is attempted before loading empiricalDistribution. |
void |
testNext()
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 |
testSerialization()
|
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 |
Field Detail |
---|
protected org.apache.commons.math.random.EmpiricalDistribution empiricalDistribution
protected org.apache.commons.math.random.EmpiricalDistribution empiricalDistribution2
protected File file
protected URL url
protected double[] dataArray
Constructor Detail |
---|
public EmpiricalDistributionTest(String name)
Method Detail |
---|
public void setUp() throws IOException
setUp
in class junit.framework.TestCase
IOException
public static junit.framework.Test suite()
public void testLoad() throws Exception
Exception
public void testDoubleLoad() throws Exception
Exception
public void testNext() throws Exception
Exception
public void testNexFail()
public void testGridTooFine() throws Exception
Exception
public void testGridTooFat() throws Exception
Exception
public void testBinIndexOverflow() throws Exception
Exception
public void testSerialization()
public void testLoadNullDoubleArray()
public void testLoadNullURL() throws Exception
Exception
public void testLoadNullFile() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |