public void Descendents() { var tree = new TreeNode("a", new TreeNode("b"), new TreeNode("c", new TreeNode("d"), new TreeNode("e"), new TreeNode("f"))); Assert.IsTrue( tree.Descendents(n => n.Children) .Select(n => n.Label) .SequenceEqual(new[] { "b", "c", "d", "e", "f" })); }