public void CountWordOccurrences_VerifyMultipleOccurrencesWithDifferentCase_3() { int total = 0; string word = "coffee"; string sentence = "I went to Starbucks Coffee and got tea instead of coffee because I don't like coffee"; WordCounter newWordCounter = new WordCounter(total, word, sentence); newWordCounter.CountWordOccurrences(); Assert.AreEqual(3, newWordCounter.GetTotal()); }
public void CountWordOccurrences_VerifySingleOccurrenceWhenTwoWordsSameExceptApostrophe_1() { int total = 0; string word = "can't"; string sentence = "I can't believe you can cant."; WordCounter newWordCounter = new WordCounter(total, word, sentence); newWordCounter.CountWordOccurrences(); Assert.AreEqual(1, newWordCounter.GetTotal()); }
public void CountWordOccurrences_VerifySingleOccurrence_1() { int total = 0; string word = "foo"; string sentence = "foo bar"; WordCounter newWordCounter = new WordCounter(total, word, sentence); newWordCounter.CountWordOccurrences(); System.Console.WriteLine("Get Total in test is " + newWordCounter.GetTotal()); Assert.AreEqual(1, newWordCounter.GetTotal()); }