コード例 #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 _));
        }
コード例 #2
0
 public T Peek()
 {
     using (EnterReadScope()) return(_internalHeap.Peek());
 }
コード例 #3
0
 public KeyValuePair <TPriority, TValue> Peek()
 {
     return(heap.Peek());
 }