Пример #1
0
 public void DequeueTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(100, 1);
     myQ.Enqueue(200, 2);
     Assert.AreEqual(200, myQ.Dequeue());
 }
Пример #2
0
 public void AnotherDequeueTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(100, 1);
     myQ.Enqueue(200, -1);
     Assert.AreEqual(100, myQ.Dequeue());
 }
Пример #3
0
 public void EnqueueUpBorderValueTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(int.MaxValue, 1);
 }
Пример #4
0
 public void EnqueueUpBorderPriorityTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(100, int.MaxValue);
 }
Пример #5
0
 public void EnqueueSimpleTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(100, 1);
 }
Пример #6
0
 public void EnqueueElementWithLowerPriorityTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(100, 1);
     myQ.Enqueue(200, -1);
 }
Пример #7
0
 public void EnqueueDownBorderValueTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(int.MinValue, 1);
 }
Пример #8
0
 public void EnqueueDownBorderPriorityTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(100, int.MinValue);
 }
Пример #9
0
 public void SaveOrderOfElementsWithEqualPrioritiesTest2()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(1, 9);
     myQ.Enqueue(2, 9);
     myQ.Enqueue(3, 9);
     Assert.AreEqual(1, myQ.Dequeue());
     Assert.AreEqual(2, myQ.Dequeue());
     Assert.AreEqual(3, myQ.Dequeue());
 }
Пример #10
0
 public void LastTest()
 {
     Queue myQ = new Queue();
     myQ.Enqueue(3, 1);
     myQ.Enqueue(2, 2);
     myQ.Enqueue(1, 3);
     Assert.AreEqual(1, myQ.Dequeue());
     Assert.AreEqual(2, myQ.Dequeue());
     Assert.AreEqual(3, myQ.Dequeue());
 }