public void CountWordsTestWhitespaceResult() { string s = " "; int rightResult = 0; SimpleParser parser = new SimpleParser(); var result = parser.CountWords(s); Assert.AreEqual(rightResult, result.Count); }
public void CountWordsTestRightResult() { string s = "אכ�פא אכ�פא מלודא בנאגמ"; var rightResult = new Dictionary <string, int> { { "אכ�פא", 2 }, { "מלודא", 1 }, { "בנאגמ", 1 } }; SimpleParser parser = new SimpleParser(); var result = parser.CountWords(s); CollectionAssert.AreEquivalent(rightResult.ToList(), result.ToList()); }