private static StringTrie <ushort> InitDictionary() { var dictionary = new StringTrie <ushort>(); dictionary.AddRange(Chars.Select((c, i) => new StringEntry <ushort>(c.ToString(), (ushort)i))); return(dictionary); }
public void AddRange() { const int count = 10; var trie = new StringTrie <bool>(); trie.AddRange(Enumerable.Range(0, count).Select(i => new StringEntry <bool>(i.ToString(), false))); Assert.Equal(count, trie.Count); }