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

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

public class LinearQueueTest
extends QueueTest

Tests public methods of LinearQueue. Queues generally have a large variety of potential states they could be in. 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

Nested Class Summary
static class LinearQueueTest.CheckedDuplexQueue
           
static class LinearQueueTest.CheckedFifoQueue
           
protected  class LinearQueueTest.LinearQueueTester
           
 
Nested classes inherited from class net.sf.zig_project.gpl.test.queue.QueueTest
QueueTest.QueueTester
 
Field Summary
 
Fields inherited from class net.sf.zig_project.gpl.test.queue.QueueTest
expected, randomizer
 
Constructor Summary
LinearQueueTest(ConsistantQueue lq)
           
 
Method Summary
protected  void establishBaseTests()
           
protected  List getAddTests()
           
protected  List getPeekTests()
           
protected  List getRemoveTests()
           
protected  Test makeTest(String s)
           
static TestSuite suite()
          Creates a Test Suite for various LinearQueues.
protected  void validateConsistancy()
           
 
Methods inherited from class net.sf.zig_project.gpl.test.queue.QueueTest
orderTests, randomValue, run, test
 
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
 

Constructor Detail

LinearQueueTest

public LinearQueueTest(ConsistantQueue lq)
Method Detail

validateConsistancy

protected void validateConsistancy()
                            throws AssertionFailedError
Overrides:
validateConsistancy in class QueueTest
Throws:
AssertionFailedError

getAddTests

protected List getAddTests()
Overrides:
getAddTests in class QueueTest

getPeekTests

protected List getPeekTests()
Overrides:
getPeekTests in class QueueTest

getRemoveTests

protected List getRemoveTests()
Overrides:
getRemoveTests in class QueueTest

establishBaseTests

protected void establishBaseTests()
Overrides:
establishBaseTests in class QueueTest

makeTest

protected Test makeTest(String s)
Specified by:
makeTest in class QueueTest

suite

public static TestSuite suite()
Creates a Test Suite for various LinearQueues. This includes calling ArrayQueueTest.suite() to test ArrayQueue, as well as including a test suite for LinkedFifoQueue.