Example #1
0
        public void Insert_ValidParamsPassed_Success()
        {
            IPriorityQueue <int> priorityQueue = new BinaryHeapPriorityQueue <int>(10, (x, y) => y.CompareTo(x));

            priorityQueue.Insert(10);
            priorityQueue.Insert(9);
            priorityQueue.Insert(8);
            priorityQueue.Insert(7);
            priorityQueue.Insert(6);
            priorityQueue.Insert(5);
            priorityQueue.Insert(4);
            priorityQueue.Insert(3);
            priorityQueue.Insert(2);
            priorityQueue.Insert(1);

            Assert.IsTrue(priorityQueue.IsFull());
        }