public void TestSuccessor() { Assert.AreEqual(tree.Nil, tree.Successor(tree.Maximum(tree.Root))); Assert.AreSame(tree.Nil, tree.Successor(tree.Maximum(tree.Root))); Assert.AreEqual(tree.Root.Right.Left, tree.Successor(tree.Root)); Assert.AreSame(tree.Root.Right.Left, tree.Successor(tree.Root)); Assert.AreEqual(tree.Root.Right.Right, tree.Successor(tree.Root.Right)); Assert.AreSame(tree.Root.Right.Right, tree.Successor(tree.Root.Right)); }