public void Peek_N_TryPeek_Behaves_For_Empty_Heap(int capacity)
        {
            IHeap <int> instance = Substitute.ForPartsOf <AbstractBinaryHeap <int> >(capacity);

            Assert.Throws <IndexOutOfRangeException>(() => instance.Peek());
            Assert.False(instance.TryPeek(out _));
        }
 public T Peek()
 {
     using (EnterReadScope()) return(_internalHeap.Peek());
 }
 public KeyValuePair <TPriority, TValue> Peek()
 {
     return(heap.Peek());
 }