public static string TreeInorderIteratorTest(int[] array)
        {
            string s = "";

            Tree<int> tree = new Tree<int>();

            foreach(var a in array)
                tree.AddNode(a);

            foreach (int a in tree.InorderIterator())
                s += a;

            Debug.WriteLine(s);

            return s;
        }
        public void TreeInorderBypassBook_NewComparer_Test()
        {
            string s = "";
            Tree<Book> tree = new Tree<Book>(new CompareBook());
            
            tree.AddNode(new Book() { Author = "Лев Толстой", Title = "Война и мир", Genre = "Роман", Year = 1869 });
            tree.AddNode(new Book() { Author = "Алан Александр Милн", Title = "Вини-Пух", Genre = "Детский рассказ", Year = 1926 });
            tree.AddNode(new Book() { Author = "Мари Шелли", Title = "Франкенштейн", Genre = "Научная фантастика", Year = 1818 });
            tree.AddNode(new Book() { Author = "Михаил Булгаков", Title = "Мастер и Маргарита", Genre = "Роман", Year = 1966 });
            tree.AddNode(new Book() { Author = "Федор Достоевский", Title = "Преступление и наказание", Genre = "Роман", Year = 1866 });

            foreach (var a in tree.InorderIterator())
                s += a.Title;

            Assert.AreEqual(s, "Вини-ПухВойна и мирФранкенштейнМастер и МаргаритаПреступление и наказание");
        }