Пример #1
0
        public void TestAddChild()
        {
            var t = new DictionaryNode();

            Assert.IsTrue(t.AddChild('a'));
            Assert.IsTrue(t.HasChild('a')); //dependent on HasChild Tests
        }
Пример #2
0
        public void TestHasChildNoChildren()
        {
            var t = new DictionaryNode();

            for (char i = 'a'; i <= 'z'; ++i)
            {
                Assert.IsFalse(t.HasChild(i));
            }
        }
Пример #3
0
        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'));
        }