Exemplo n.º 1
0
        public void PeekTest()
        {
            ItemQueue q = CreateQueue(new int[] { 4, 2, 3, 1 });

            Assert.AreEqual(1, q.Peek().Value);

            ItemQueue r = CreateReversedQueue(new int[] { 4, 2, 3, 1 });

            Assert.AreEqual(4, r.Peek().Value);

            ItemQueue e = new ItemQueue();

            Assert.IsNull(e.Peek());
        }