public void ThrowException_WhenWordsAreNull() { var settings = new WordsPreprocessorSettings(); var preprocessor = new BoringWordsExcluder(settings); Action runner = () => preprocessor.Process(null); runner.Should().Throw <ArgumentNullException>(); }
public void BeNotSucceed_WhenWordsAreNull() { var settings = new WordsPreprocessorSettings(); var preprocessor = new BoringWordsExcluder(settings); var result = preprocessor.Process(null); result.IsSuccess.Should().BeFalse(); }
public void ExcludeBoringWords(int length) { var settings = new WordsPreprocessorSettings { BoringWordsLength = length }; var preprocessor = new BoringWordsExcluder(settings); var result = preprocessor.Process(words); result.Should().NotContain(str => str.Length < length); }
public void ExcludeGivenWords(params string[] wordsToExclude) { var settings = new WordsPreprocessorSettings { ExcludedWords = wordsToExclude }; var preprocessor = new BoringWordsExcluder(settings); var result = preprocessor.Process(words); result.Should().NotContain(wordsToExclude); }