Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public void BinarySearchTree_03_RemoveMin_02_OnTree1Element()
        {
            // Arrange
            IBinarySearchTree <int> tree = DSBuilder.CreateBinarySearchTreeInt1Element();
            string expected = "NIL";

            // Act
            tree.RemoveMin();
            string actual = tree.ToInfixString();

            // Assert
            Assert.AreEqual(expected, actual);
        }