public void Add_ValidWordArgument_TrueAndChangeAnagramRest(string anagram, string word, string expectedAnagramRest) { var anagramMatchTracker = new AnagramMatchTracker(anagram); Assert.True(anagramMatchTracker.Add(word)); Assert.AreEqual(expectedAnagramRest, anagramMatchTracker.AnagramRest); }
public void Add_InvalidWordArgument_FalseAndUnchangedAnagramRest(string word) { var anagramMatchTracker = new AnagramMatchTracker("anagram"); var existingAnagramRest = anagramMatchTracker.AnagramRest; Assert.False(anagramMatchTracker.Add(word)); Assert.AreEqual(existingAnagramRest, anagramMatchTracker.AnagramRest); }
public void Remove_AddWordAndRemoveItAgain_AnagramRestSame(string anagram, string word, string expectedAnagramRest) { var anagramMatchTracker = new AnagramMatchTracker(anagram); anagramMatchTracker.Add(word); anagramMatchTracker.Remove(); Assert.AreEqual(expectedAnagramRest, anagramMatchTracker.AnagramRest); }