public void Build_ShouldBuildCorrectHeap(int[] array, HeapPropertyVerifier verifier, HeapFactory heapFactory) { // Arrange // Act // Assert Assert.IsTrue(verifier(heapFactory(array, _intMaxComparer).ToArray())); }
public void Remove_ShouldRemoveElementAtIndexAndThenFixTheHeapProperty(int[] array, HeapFactory heapFactory, HeapPropertyVerifier verifier) { // Arrange var heap = heapFactory(array, _intMaxComparer); // Act heap.Remove(5); // Assert Assert.IsTrue(verifier(heap.ToArray())); }