Exemple #1
0
        public void Dequeuing_returns_enqueued_item_in_fifo_order()
        {
            var queue = new QueueFromStack <int>();

            queue.Enque(3).Enque(2).Enque(1);

            Assert.That(queue.Deque(), Is.EqualTo(3));
            Assert.That(queue.Deque(), Is.EqualTo(2));
            Assert.That(queue.Deque(), Is.EqualTo(1));
        }
Exemple #2
0
        public void Enqueuing_returns_queue()
        {
            var queue = new QueueFromStack <int>();

            Assert.That(queue.Enque(3), Is.EqualTo(queue));
        }