Beispiel #1
0
        public void TestInvalidCopyTo2()
        {
            GeneralTree <int> t = GetTestTree();

            int[] array = new int[7];
            t.CopyTo(array, 1);
        }
Beispiel #2
0
        public void TestCopyTo()
        {
            GeneralTree <int> t = GetTestTree();

            int[] array = new int[7];
            t.CopyTo(array, 0);

            List <int> l = new List <int>(array);

            Assert.AreEqual(l.Contains(5), true);
            Assert.AreEqual(l.Contains(2), true);
            Assert.AreEqual(l.Contains(3), true);
            Assert.AreEqual(l.Contains(1), true);
            Assert.AreEqual(l.Contains(9), true);
            Assert.AreEqual(l.Contains(12), true);
            Assert.AreEqual(l.Contains(13), true);
        }
Beispiel #3
0
        public void TestNullCopyTo()
        {
            GeneralTree <int> t = GetTestTree();

            t.CopyTo(null, 1);
        }