Ejemplo n.º 1
0
        public void MaximumCalledOnEmptyTreeCausesException()
        {
            var tree = new BinarySearchTree<int>();

            Assert.Throws<InvalidOperationException>(() => tree.Maximum());
        }
Ejemplo n.º 2
0
        public void MaximumValue()
        {
            var tree = new BinarySearchTree<int> {15, 6, 18, 20};

            Assert.That(tree.Maximum(), Is.EqualTo(20));
        }