예제 #1
0
 public void TestPrintQueueEmptyQueue()
 {
     // ARRANGE
     QueueLab.queue myQueue = new QueueLab.queue(1);
     // ACT
     // ASSERT
     Assert.Throws <QueueLab.queueEmptyException>(() => myQueue.printQueue());
 }
예제 #2
0
        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);
        }