public void DequeueToTest_NotSuchItem() { var q = new Queue<int>(new[] {1, 2, 3, 4, 5}); var dqed = q.DequeueTo(-1); CollectionAssert.AreEqual(new[] {1, 2, 3, 4, 5}, dqed); CollectionAssert.IsEmpty(q); }
public void DequeueToTest() { var q = new Queue<int>(new[] {1, 2, 3, 4, 5}); var dqed = q.DequeueTo(4); CollectionAssert.AreEqual(new[] {1, 2, 3}, dqed); CollectionAssert.AreEqual(new[] {5}, q); }