Ejemplo n.º 1
0
        public void Given_a_Trie_with_two_items_When_a_subitem_is_added_Then_it_has_three_items()
        {
            //Given
            var trie = new StringTrie <string>();

            trie.Add("Alpha", "first");
            trie.Add("B", "second");
            //When
            trie.Add("Beta", "third");

            Helper.WriteLine(trie.ToString());
            //Then
            var items = trie.ToArray();

            AssertEqual(items[0], "Alpha", "first");
            AssertEqual(items[1], "B", "second");
            AssertEqual(items[2], "Beta", "third");
        }