Ejemplo n.º 1
0
        public void CanStoreDefaultValueOfT()
        {
            var tree = BinaryTree.Create(1, 0, 2);

            CollectionAssert.AreEqual(new[] { 0, 1, 2 }, tree);
        }
Ejemplo n.º 2
0
        public void InitializeFromAnArrayAndSort2()
        {
            var tree = BinaryTree.Create(2, 4, 1, 7, 3, 9, 5, 6, 8);

            CollectionAssert.AreEqual(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, tree);
        }