Пример #1
0
 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);
 }
Пример #2
0
 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);
 }