public void Pop_N_TryPop_Behaves_For_Empty_Heap(int capacity) { IHeap <int> instance = Substitute.ForPartsOf <AbstractBinaryHeap <int> >(capacity); Assert.Throws <IndexOutOfRangeException>(() => instance.Pop()); Assert.False(instance.TryPop(out _)); }