@@ -0,0 +1,1220 @@
+package com.jeffreydiaz.test.collections;%0A%0Aimport com.jeffreydiaz.collections.LinkedQueue;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Test class for LinkedQueue.%0A * @author Jeffrey Diaz%0A */%0Apublic class LinkedQueueTest %7B%0A%0A%09private LinkedQueue%3CString%3E queue;%0A%0A%09@Before%0A%09public void setUp()%0A%09%7B%0A%09%09queue = new LinkedQueue%3CString%3E();%0A%09%7D%0A%0A%09@After%0A%09public void tearDown()%0A%09%7B%0A%09%09queue = null;%0A%09%7D%0A%0A%09@Test%0A%09public void CreateEmptyQueue()%0A%09%7B%0A%09%09assertTrue(queue.isEmpty());%0A%09%09assertTrue(queue.size() == 0);%0A%09%7D%0A%0A%09@Test%0A%09public void TestAddingAndRemovingItems()%0A%09%7B%0A%09%09for (int i = 0; i %3C 1000; ++i) %7B%0A%09%09%09queue.enqueue(Integer.toString(i));%0A%09%09%7D%0A%0A%09%09assertFalse(queue.isEmpty());%0A%09%09assertTrue(queue.size() == 1000);%0A%0A%09%09for (int i = 0; i %3C 1000; ++i) %7B%0A%09%09%09assertTrue(queue.dequeue().equals(Integer.toString(i)));%0A%09%09%7D%0A%0A%09%09assertTrue(queue.isEmpty());%0A%09%09assertTrue(queue.size() == 0);%0A%09%7D%0A%0A%09@Test%0A%09public void TestQueueIterator()%0A%09%7B%0A%09%09for (int i = 0; i %3C 1000; ++i) %7B%0A%09%09%09queue.enqueue(Integer.toString(i));%0A%09%09%7D%0A%0A%09%09int i = 0;%0A%09%09for (String val : queue) %7B%0A%09%09%09assertTrue(val.equals(Integer.toString(i)));%0A%09%09%09++i;%0A%09%09%7D%0A%09%7D%0A%7D

Test class for LinkedQueue.