public void CountMax() { var queue = new LLQueue <int>(Enumerable.Range(0, 100)); Assert.AreEqual(100, queue.CountUntil(200)); Assert.AreEqual(100, queue.CountUntil(100)); Assert.AreEqual(50, queue.CountUntil(50)); Assert.AreEqual(0, queue.CountUntil(0)); queue.Clear(); Assert.IsTrue(queue.IsEmpty); }
public void CountMax() { var queue = new LLQueue<int>(Enumerable.Range(0, 100)); Assert.AreEqual(100, queue.CountUntil(200)); Assert.AreEqual(100, queue.CountUntil(100)); Assert.AreEqual(50, queue.CountUntil(50)); Assert.AreEqual(0, queue.CountUntil(0)); queue.Clear(); Assert.IsTrue(queue.IsEmpty); }