public void MaxIntHashOverflowTest() { // Arrange MaxIntHeap maxIntHeap = new MaxIntHeap(4); int[] arrayAnswer = { 5, 10, 15, 20, 17 }; int[] myArray = new int[5]; // Act maxIntHeap.add(10); maxIntHeap.add(15); maxIntHeap.add(20); maxIntHeap.add(17); maxIntHeap.add(5); // Assert Assert.Equal(8, maxIntHeap.GetHeapSize()); }
public void MaxHashNodePullFuncTests() { // Arrange MaxIntHeap maxIntHeap = new MaxIntHeap(); // 10 15 20 17 int[] arrayAnswer = { 15, 17, 20 }; int[] myArray = new int[4]; maxIntHeap.add(10); maxIntHeap.add(15); maxIntHeap.add(20); maxIntHeap.add(17); // Act maxIntHeap.pull(); // Assert Assert.Equal(17, maxIntHeap.pull()); }
public void MaxIntHeap_Test() { // Test for MinHash Creation, add, and pull // Arrange MaxIntHeap maxIntHeap = new MaxIntHeap(); int[] arrayAnswer = { 10, 15, 20, 17 }; int[] myArray = new int[4]; // Act maxIntHeap.add(10); maxIntHeap.add(15); maxIntHeap.add(20); maxIntHeap.add(17); // Assert Assert.Equal(20, maxIntHeap.pull()); Assert.Equal(17, maxIntHeap.pull()); Assert.Equal(15, maxIntHeap.pull()); Assert.Equal(10, maxIntHeap.pull()); }