public void BinarySearchTree_02_FindMin_01_OnEmptyTree() { // Arrange IBinarySearchTree <int> tree = DSBuilder.CreateBinarySearchTreeIntEmpty(); // Act & Assert Assert.Throws(typeof(BinarySearchTreeEmptyException), () => tree.FindMin()); }
public void BinarySearchTree_02_FindMin_04_OnModerateIntTree() { // Arrange IBinarySearchTree <int> tree = DSBuilder.CreateBinarySearchTreeIntModerate(); int expected = 3; // Act int actual = tree.FindMin(); // Act & Assert Assert.AreEqual(expected, actual); }
public void BinarySearchTree_02_FindMin_02_OnTree1Element() { // Arrange IBinarySearchTree <int> tree = DSBuilder.CreateBinarySearchTreeInt1Element(); int expected = 4; // Act int actual = tree.FindMin(); // Act & Assert Assert.AreEqual(expected, actual); }