public void Insert() { var tree = new AvlTree <int>(); tree.Insert(10); tree.Insert(20); Assert.IsTrue(tree.ContainsKey(10)); Assert.IsTrue(tree.ContainsKey(20)); Assert.IsFalse(tree.ContainsKey(30)); }
public void TestContainsAfterRemove() { var tree = new AvlTree <int, int>(); for (var i = 0; i < 100; i++) { tree.Add(i, i); } tree.Remove(25); Assert.IsFalse(tree.ContainsKey(25)); }