Exemple #1
0
        public void CopyItems()
        {
            var tree = new TTree <int>(2, 2);

            tree.Add(10);
            tree.Add(11);
            tree.Add(1);
            tree.Add(20);

            var items = new int[20];

            tree.CopyItems(items, 0);

            Assert.AreEqual(1, items[0], "Invalid value at 0");
            Assert.AreEqual(10, items[1], "Invalid value at 1");
            Assert.AreEqual(11, items[2], "Invalid value at 2");
            Assert.AreEqual(20, items[3], "Invalid value at 3");
        }