public void DescendingPriorityQueueGetMaximumValueTest()
        {
            DescendingPriorityQueue <int, int> priorityQueue = new DescendingPriorityQueue <int, int>();

            priorityQueue.Insert(2, 55);
            priorityQueue.Insert(1, 77);
            Assert.AreEqual(2, priorityQueue.Size);
            Assert.AreEqual(55, priorityQueue.GetMaximumValue());
            Assert.AreEqual(2, priorityQueue.Size);
        }
        public void DescendingPriorityQueueIsEmptyTest()
        {
            DescendingPriorityQueue <int, int> priorityQueue = new DescendingPriorityQueue <int, int>();

            Assert.IsTrue(priorityQueue.IsEmpty);
            priorityQueue.Insert(1, 1);
            priorityQueue.Insert(2, 2);
            Assert.IsFalse(priorityQueue.IsEmpty);
            priorityQueue.Clear();
            Assert.IsTrue(priorityQueue.IsEmpty);
        }
        public virtual void DescendingPriorityQueueClearTest()
        {
            DescendingPriorityQueue <int, int> priorityQueue = new DescendingPriorityQueue <int, int>();

            Assert.AreEqual(0, priorityQueue.Size);
            priorityQueue.Clear();
            Assert.AreEqual(0, priorityQueue.Size);
            priorityQueue.Insert(1, 11);
            priorityQueue.Insert(2, 22);
            Assert.AreEqual(2, priorityQueue.Size);
            priorityQueue.Clear();
            Assert.AreEqual(0, priorityQueue.Size);
        }
        public void DescendingPriorityQueueGetValueTest()
        {
            DescendingPriorityQueue <int, int> priorityQueue = new DescendingPriorityQueue <int, int>();

            priorityQueue.Insert(1, 11);
            priorityQueue.Insert(2, 22);
            priorityQueue.Insert(3, 33);
            Assert.AreEqual(3, priorityQueue.Size);
            Assert.AreEqual(33, priorityQueue.GetValue(0));
            Assert.AreEqual(22, priorityQueue.GetValue(1));
            Assert.AreEqual(11, priorityQueue.GetValue(2));
            Assert.AreEqual(3, priorityQueue.Size);
        }
        public void DescendingPriorityQueueSizeTest()
        {
            DescendingPriorityQueue <int, int> priorityQueue = new DescendingPriorityQueue <int, int>();

            Assert.AreEqual(0, priorityQueue.Size);
            priorityQueue.Insert(1, 11);
            priorityQueue.Insert(2, 111);
            Assert.AreEqual(2, priorityQueue.Size);
            priorityQueue.DeleteMaximumValue();
            Assert.AreEqual(1, priorityQueue.Size);
            priorityQueue.DeleteMaximumValue();
            Assert.AreEqual(0, priorityQueue.Size);
        }
        public void DescendingPriorityQueueInsertTest()
        {
            DescendingPriorityQueue <int, int> priorityQueue = new DescendingPriorityQueue <int, int>();

            priorityQueue.Insert(1, 11);
            priorityQueue.Insert(2, 22);
            priorityQueue.Insert(3, 33);
            List <int> valueList = new List <int>();

            while (priorityQueue.Size != 0)
            {
                valueList.Add(priorityQueue.DeleteMaximumValue());
            }
            CollectionAssert.AreEqual(new int[] { 33, 22, 11 }, valueList);
        }
        public void DescendingPriorityQueueGetValueGuardCase2Test()
        {
            DescendingPriorityQueue <int, int> priorityQueue = new DescendingPriorityQueue <int, int>();

            priorityQueue.Insert(1, 11);
            var result = priorityQueue.GetValue(1);
        }
        public void DescendingPriorityQueueInsertGuardTest()
        {
            DescendingPriorityQueue <string, int> priorityQueue = new DescendingPriorityQueue <string, int>();

            priorityQueue.Insert(null, 1);
        }