public void TestPrintQueueEmptyQueue() { // ARRANGE QueueLab.queue myQueue = new QueueLab.queue(1); // ACT // ASSERT Assert.Throws <QueueLab.queueEmptyException>(() => myQueue.printQueue()); }
public void TestPrintQueue() { // ARRANGE QueueLab.queue myQueue = new QueueLab.queue(2); String item = "queueItem"; String actual, expected; expected = "queueItem1\nqueueItem2\n"; // ACT myQueue.enqueue(item + "1"); myQueue.enqueue(item + "2"); actual = myQueue.printQueue(); // ASSERT Assert.Equal(expected, actual); }