public void TryAdd_ExistingAnagram_FalseReturned() { String word = "вертикаль"; var anagram = new Anagram(word); Boolean value = anagram.TryAdd(word); Assert.IsFalse(value); }
public void IsAnagram_MultipleWords_TrueReturned() { String word = "вертикаль", wordToAdd = "кильватер"; var anagram = new Anagram(word); anagram.TryAdd(wordToAdd); Boolean value = anagram.IsAnagram; Assert.IsTrue(value); }
public void TryAdd_ExistingAnagram_NoChangesMade() { String word = "вертикаль"; var anagram = new Anagram(word); Boolean value = anagram.TryAdd(word); Assert.IsTrue(anagram.Count() == 1 && anagram.Contains(word)); }
public void TryAdd_NotAnagram_FalseReturned() { String word = "вертикаль", wordToAdd = "король"; var anagram = new Anagram(word); Boolean value = anagram.TryAdd(wordToAdd); Assert.IsFalse(value); }
public void TryAdd_NewAnagram_AnagramAdded() { String word = "вертикаль", wordToAdd = "кильватер"; var anagram = new Anagram(word); Boolean value = anagram.TryAdd(wordToAdd); Assert.IsTrue(anagram.Count() == 2 && anagram.Contains(word) && anagram.Contains(wordToAdd)); }