public void CanAddWord() { string word = "box"; var dict = new ComboDict(word); dict.Add(word); ulong key = ComboDict.GetComboKey(word); Assert.That(dict.GetWordsByKey(key).Contains(word)); }
public void AnagrammaticWordsHaveSameKey() { string word1 = "god"; string word2 = "dog"; var dict = new ComboDict(word2); ulong key1 = ComboDict.GetComboKey(word1); ulong key2 = ComboDict.GetComboKey(word2); Assert.That(key1, Is.EqualTo(key2)); }