Esempio n. 1
0
 public void Build_ShouldBuildCorrectHeap(int[] array, HeapPropertyVerifier verifier, HeapFactory heapFactory)
 {
     // Arrange
     // Act
     // Assert
     Assert.IsTrue(verifier(heapFactory(array, _intMaxComparer).ToArray()));
 }
Esempio n. 2
0
        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()));
        }