Beispiel #1
0
        public void Test_DequeueFirst()
        {
            MyDeque <int> deq = new MyDeque <int>();

            deq.EnqueueLast(1);
            deq.EnqueueLast(2);
            deq.EnqueueLast(3);
            deq.EnqueueLast(4);
            int expected = deq.PeekFirst();
            int count1   = deq.Count;
            int actual   = deq.DequeueFirst();
            int count2   = deq.Count;

            Assert.AreEqual(actual, expected);
            Assert.AreNotEqual(count1, count2);
        }