public void KnownWordsIgnoresWhitespace() { var wordWithPadding = " padding "; var allWords = new[] { wordWithPadding, "another", "word" }; var knownWords = new KnownWords(allWords); Assert.That(knownWords.IsKnownWord(wordWithPadding), Is.False, "a word with white space padding should not have been known"); Assert.That(knownWords.IsKnownWord(wordWithPadding.Trim()), Is.True, "a word with white space padding Trimmed should have been known"); }
public void KnownWordsIgnoresWhitespaceWords() { var oneSpace = " "; var threeSpace = " "; var allWords = new[] { oneSpace, threeSpace }; var knownWords = new KnownWords(allWords); Assert.That(knownWords.IsKnownWord(oneSpace), Is.False, nameof(oneSpace)); Assert.That(knownWords.IsKnownWord(threeSpace), Is.False, nameof(threeSpace)); }