public void PeekMax_ExpectCountNotChange() { var heap = new MaxBinaryHeap<int>(); heap.Add(10); heap.PeekMax(); Assert.AreEqual(1, heap.Count); }
public void PeekMax_OneItem_ExpectReturnItem() { var heap = new MaxBinaryHeap<int>(); heap.Add(10); var peekedItem = heap.PeekMax(); Assert.AreEqual(10, peekedItem); }
public void PeekMax_EmptyHeap_ExpectThrowInvalidOperationException() { var heap = new MaxBinaryHeap<int>(); heap.PeekMax(); }