public void PeekIteratorTest() { GenericCustomQueue <double> q = new GenericCustomQueue <double>(); Queue <double> q1 = new Queue <double>(); q.Enqueue(1.8); q.Enqueue(2.8); q.Enqueue(3.6); q.Enqueue(4.8); q.Enqueue(5.5); q.Enqueue(6.8); q1.Enqueue(1.8); q1.Enqueue(2.8); q1.Enqueue(3.6); q1.Enqueue(4.8); q1.Enqueue(5.5); q1.Enqueue(6.8); int count = q.Count; Assert.AreEqual(q.Peek(), q.Peek()); Assert.AreEqual(count, q.Count); foreach (var t in q) { Assert.AreEqual(t, q1.Dequeue(), "iterator"); } }
public void PeekExeptionTest() { GenericCustomQueue <double> q = new GenericCustomQueue <double>(); q.Peek(); }