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 _)); }