public void TestAddChild() { var t = new DictionaryNode(); Assert.IsTrue(t.AddChild('a')); Assert.IsTrue(t.HasChild('a')); //dependent on HasChild Tests }
public void TestHasChildNoChildren() { var t = new DictionaryNode(); for (char i = 'a'; i <= 'z'; ++i) { Assert.IsFalse(t.HasChild(i)); } }
public void TestHasChildWithChildren() { var t = new DictionaryNode(); for (char i = 'a'; i <= 'z'; ++i) { t.AddChild(i); Assert.IsTrue(t.HasChild(i)); } Assert.IsFalse(t.AddChild('a')); }