public void PriorotyQueue_PeekSingleNodePQ() { MaxHeapPriorityQueue pq = new MaxHeapPriorityQueue(); pq.Enqueue(0, 0); Assert.AreEqual(0, pq.Peek().Priority); }
public void PriorotyQueue_CountIsUnchagedAfterPeek() { MaxHeapPriorityQueue pq = new MaxHeapPriorityQueue(); pq.Enqueue(10, 1); PQNode peek = pq.Peek(); Assert.AreEqual(1, pq.Count); }
public void PriorotyQueue_PeekThirteenNodePQ() { MaxHeapPriorityQueue pq = new MaxHeapPriorityQueue(); for (int i = 0; i < 13; i++) { pq.Enqueue(i * 10, i); } Assert.AreEqual(120, pq.Peek().Priority); }
public void PriorotyQueue_MethodsExist() { MaxHeapPriorityQueue pq = new MaxHeapPriorityQueue(); pq.Enqueue(10, 1); pq.Dequeue(); pq.Peek(); pq.ToSortedArray(); pq.ToString(); int num = pq.Count; Assert.IsNotNull(pq); }