Пример #1
0
        public void Tree_ReturnsFalseIfTreeDoesNotContainElement()
        {
            var tree = new BinaryTreeImplementation();

            tree.Insert(30);
            tree.Insert(20);
            tree.Insert(40);
            Assert.False(tree.Contains(120));
        }
Пример #2
0
        public void Tree_ReturnsTrueIfTreeContainsElement()
        {
            var tree = new BinaryTreeImplementation();

            tree.Insert(30);
            tree.Insert(20);
            tree.Insert(40);
            Assert.True(tree.Contains(20));
        }