public void Tree_StartsEmpty() { var tree = new BinaryTreeImplementation(); Assert.Equal(-1, tree.Height()); Assert.Equal(0, tree.CountNodes()); }
public void Tree_CanCountNodes() { var tree = new BinaryTreeImplementation(); tree.Insert(30); tree.Insert(20); tree.Insert(40); Assert.Equal(3, tree.CountNodes()); Assert.Equal(3, tree.CountNodesWithQueue()); }