test
Class PointsOfInterestTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by test.PointsOfInterestTest
All Implemented Interfaces:
junit.framework.Test

public class PointsOfInterestTest
extends junit.framework.TestCase

Test for selecting Points Of Interest from different node groups. Tests that the probability of getting a node from a specific group is approximately same as the defined probability.


Constructor Summary
PointsOfInterestTest()
           
 
Method Summary
 void runTestPoiSelection(double[] poiProbs, int rngSeed)
          Runs the POI selecting procedure and performs checks
protected  void setUpWith(double[] poiProbs, int rngSeed, int[] okNodes)
           
 void testDifferentRngSeeds()
           
 void testFullProb()
          Tests full probability for one node group
 void testOkNodes()
           
 void testPoiSelection()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PointsOfInterestTest

public PointsOfInterestTest()
Method Detail

setUpWith

protected void setUpWith(double[] poiProbs,
                         int rngSeed,
                         int[] okNodes)
                  throws java.lang.Exception
Throws:
java.lang.Exception

testPoiSelection

public void testPoiSelection()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testDifferentRngSeeds

public void testDifferentRngSeeds()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testFullProb

public void testFullProb()
                  throws java.lang.Exception
Tests full probability for one node group

Throws:
java.lang.Exception

runTestPoiSelection

public void runTestPoiSelection(double[] poiProbs,
                                int rngSeed)
                         throws java.lang.Exception
Runs the POI selecting procedure and performs checks

Throws:
java.lang.Exception

testOkNodes

public void testOkNodes()
                 throws java.lang.Exception
Throws:
java.lang.Exception