public void AdvancingHeadOnEmptyQueueCausesException() { var queue = new LeakyQueue <int>(); Assert.Throws <InvalidOperationException>( delegate() { queue.AdvanceHead(); } ); }
public void QueueHeadCanBeAdvanced() { var queue = new LeakyQueue <int>(); queue.Enqueue(12); queue.Enqueue(34); Assert.AreEqual(12, queue.Peek()); queue.AdvanceHead(); Assert.AreEqual(34, queue.Peek()); }