Exemplo n.º 1
0
        public void getHeightTest_EmptyTree_ReturnZero()
        {
            //arrange
            var myBST = new binarySearchTree <String>();

            //act
            //assert
            Assert.AreEqual(0, myBST.getHeight());
        }
Exemplo n.º 2
0
        public void getHeightTest_TwoNode_ReturnTwo()
        {
            //arrange
            var myBST = new binarySearchTree <int>();

            //act
            myBST.addNode(1);
            myBST.addNode(2);
            //assert
            Assert.AreEqual(2, myBST.getHeight());
        }