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); }
public CloudDrawAction(IFileReader reader, IWordsPreprocessor[] preprocessors, FrequencyCounter frequencyCounter, WordsPreprocessorSettings preprocessorSettings, IFilePathProvider filePath, TagCloudPainter painter, LayouterApplicator applicator, PictureBoxImageHolder imageHolder) { this.reader = reader; this.preprocessors = preprocessors; this.frequencyCounter = frequencyCounter; this.preprocessorSettings = preprocessorSettings; this.filePath = filePath; this.painter = painter; this.applicator = applicator; this.imageHolder = imageHolder; }