Exemplo n.º 1
0
        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 _));
        }
Exemplo n.º 2
0
 public T Peek()
 {
     using (EnterReadScope()) return(_internalHeap.Peek());
 }
 public KeyValuePair <TPriority, TValue> Peek()
 {
     return(heap.Peek());
 }