Ejemplo n.º 1
0
        public void TestBSTLowest()
        {
            var inttree = new BinarySearchTree<int>() { 40, 11, 62, 43, 34, 16, 10, 63 };
            var stringtree = new BinarySearchTree<string>() { "hello", "test", "Case", "scenario" };
            var doubletree = new BinarySearchTree<double>() { 74.24, 75.1, 1.75, 64.1, 2.535, 63.2, 1.4 };

            Assert.AreEqual(10, inttree.Lowest(), "\nLowest int.");
            Assert.AreEqual("Case", stringtree.Lowest(), "\nLowest string.");
            Assert.AreEqual(1.4, doubletree.Lowest(), "\nLowest double.");
        }