public void BSTArray_4_Remove_2_OnBSTArrayBig( [Values( 10, 30, 70, 50, 80 )] int input, [Values( "50,20,30,40,80,70,60,90", "50,20,10,40,80,70,60,90", "50,20,10,30,40,80,60,90", "60,20,10,30,40,80,70,90", "50,20,10,30,40,90,70,60")] string expected) { // Arrange BSTArray a = BuildBSTArrayBig(); // Act Assert.IsTrue(a.Contains(input)); a.Remove(input); string actual = TestUtils.StringWithoutSpaces(a.GetPreOrder()); // Assert Assert.IsFalse(a.Contains(input)); Assert.AreEqual(expected, actual); }
public void BSTArray_3_GetPreOrder_1_OnBSTArraySmall() { // Arrange BSTArray a = BuildBSTArraySmall(); string expected = "4,2,7"; // Act string actual = TestUtils.StringWithoutSpaces(a.GetPreOrder()); // Assert Assert.AreEqual(expected, actual); }
public void BSTArray_3_GetPreOrder_2_OnBSTArrayBig() { // Arrange BSTArray a = BuildBSTArrayBig(); string expected = "50,20,10,30,40,80,70,60,90"; // Act string actual = TestUtils.StringWithoutSpaces(a.GetPreOrder()); // Assert Assert.AreEqual(expected, actual); }
public void BSTArray_3_GetPreOrder_1_OnBSTArrayEmpty() { // Arrange BSTArray a = new BSTArray(); string expected = ""; // Act string actual = TestUtils.StringWithoutSpaces(a.GetPreOrder()); // Assert Assert.AreEqual(expected, actual); }
public void BSTArray_4_Remove_1_OnBSTArrayOne() { // Arrange BSTArray a = BuildBSTArrayOne(); string expected = ""; // Act a.Remove(42); string actual = TestUtils.StringWithoutSpaces(a.GetPreOrder()); // Assert Assert.AreEqual(expected, actual); }