Пример #1
0
        public static void When_Enqueued_Then_DequeuedInFIFO()
        {
            Chapter09.QueueWithStacks queue = new Chapter09.QueueWithStacks();
            queue.Enqueue(0);
            queue.Enqueue(1);
            queue.Enqueue(2);

            Assert.AreEqual(0, queue.Dequeue());
            Assert.AreEqual(1, queue.Dequeue());
            Assert.AreEqual(2, queue.Dequeue());
        }
Пример #2
0
 public void When_QueueIsEmpty_Then_DequeueReturnsInMin()
 {
     Chapter09.QueueWithStacks queue = new Chapter09.QueueWithStacks();
     Assert.AreEqual(int.MinValue, queue.Dequeue());
 }