net.sf.zig_project.gpl.test.queue
Class QueueTest

java.lang.Object
  extended byjunit.framework.TestSuite
      extended bynet.sf.zig_project.gpl.test.queue.QueueTest
All Implemented Interfaces:
Test
Direct Known Subclasses:
LinearQueueTest, OrderedQueueTest

public abstract class QueueTest
extends TestSuite

Base class to set up test cases for Queues. While some very preliminary tests are conducted to ensure that most states get it, in order to attempt to test them all, this will conduct a suite of several thousand randomized tests.

Version:
January 24, 2005
Author:
Frank Ziglar
See Also:
suite()

Nested Class Summary
protected  class QueueTest.QueueTester
           
 
Field Summary
protected  ArrayList expected
           
protected static Random randomizer
           
 
Constructor Summary
QueueTest(Queue q)
           
 
Method Summary
protected  void establishBaseTests()
           
protected  List getAddTests()
           
protected  List getPeekTests()
           
protected  List getRemoveTests()
           
protected abstract  Test makeTest(String s)
           
 void orderTests(int test_count, int rand_prob)
           
protected static Integer randomValue()
           
 void run(TestResult tr)
           
static TestSuite suite()
           
protected  void test(String s)
           
protected  void validateConsistancy()
           
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expected

protected final ArrayList expected

randomizer

protected static final Random randomizer
Constructor Detail

QueueTest

public QueueTest(Queue q)
Method Detail

run

public void run(TestResult tr)

validateConsistancy

protected void validateConsistancy()
                            throws AssertionFailedError
Throws:
AssertionFailedError

randomValue

protected static Integer randomValue()

test

protected final void test(String s)

makeTest

protected abstract Test makeTest(String s)

orderTests

public void orderTests(int test_count,
                       int rand_prob)

getAddTests

protected List getAddTests()

getRemoveTests

protected List getRemoveTests()

getPeekTests

protected List getPeekTests()

establishBaseTests

protected void establishBaseTests()

suite

public static TestSuite suite()