public void Queue_PeekedAndDequeuedAreEqual(IQueueable <int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); var temp = queue.Peek(); Assert.Equal(temp, queue.Dequeue()); }
public void Queue_PeekedFromClear_ShouldThrowInvalidOperation(IQueueable <int> queue) { Assert.Throws(typeof(InvalidOperationException), () => { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); queue.Clear(); queue.Peek(); }); }
public void Queue_PeekedAndDequeuedAreEqual(IQueueable<int> queue) { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); var temp = queue.Peek(); Assert.Equal(temp, queue.Dequeue()); }
public void Queue_PeekedFromClear_ShouldThrowInvalidOperation(IQueueable<int> queue) { Assert.Throws(typeof(InvalidOperationException), () => { queue.Enqueue(42); queue.Enqueue(37); queue.Enqueue(100500); queue.Clear(); queue.Peek(); }); }