public void Prop_WordDictionary_ReturnsCorrectCount() { var target = new CommonWordCounter(FiveWordsAllSame); Assert.AreEqual(1, target.WordDictionary.Count); Assert.AreEqual(5, target.WordDictionary["the"]); target = new CommonWordCounter(FiveWordsAllDifferent); Assert.AreEqual(5, target.WordDictionary.Count); Assert.AreEqual(1, target.WordDictionary["test"]); Assert.AreEqual(1, target.WordDictionary["apple"]); Assert.AreEqual(1, target.WordDictionary["board"]); Assert.AreEqual(1, target.WordDictionary["maybe"]); Assert.AreEqual(1, target.WordDictionary["hello"]); target = new CommonWordCounter(SimplePunctuationTest); Assert.AreEqual(1, target.WordDictionary.Count); Assert.AreEqual(5, target.WordDictionary["test"]); target = new CommonWordCounter(FullTest); }
public void Ctor_NullArgumentFails() { var target = new CommonWordCounter(null); }