Exemplo n.º 1
0
        public void BinarySearchTree_05_ToString_02_OnSmallTree()
        {
            // Arrange
            IBinarySearchTree <int> tree = DSBuilder.CreateBinarySearchTreeIntSmall();
            string expected = "2 4 5 6 7";

            // Act
            string actual = tree.ToString();

            // Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void BinarySearchTree_05_ToString_03_OnModerateTree()
        {
            // Arrange
            IBinarySearchTree <int> tree = DSBuilder.CreateBinarySearchTreeIntModerate();
            string expected = "3 7 8 12 17 24 26 32 34 37 42 45 50";

            // Act
            string actual = tree.ToString();

            // Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void BinarySearchTree_05_ToString_01_OnEmptyTree()
        {
            // Arrange
            IBinarySearchTree <int> tree = DSBuilder.CreateBinarySearchTreeIntEmpty();
            string expected = "";

            // Act
            string actual = tree.ToString();

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