FileDocCategorySizeDatePackage
QueueTest.javaAPI DocExample528Sat Feb 17 15:24:28 GMT 2001None

QueueTest

public class QueueTest extends TestCase
A simple test case for Queue

Fields Summary
protected Queue
q
Constructors Summary
public QueueTest(String name)
JUnit test classes require this constructor

		super(name);
	
Methods Summary
public voidsetUp()

		q = new Queue();
		q.q_add("One");
		q.q_add("Two");
	
public voidtestQueue()

		assertEquals(q.q_take(), "One");
		assertEquals(q.q_take(), "Two");
		q.q_add("Three");
		assertEquals(q.q_take(), "Three");
		assert(q.size() ==  0);
		System.out.println("DONE");