public void AnalyzedWordsShouldBeLowercase() { wordReader.AddWords(new[] { "FirsT", "first" }); var words = wordsAnalyzer.AnalyzeWords(); words.Value.Count.Should().Be(1); }
public void AnalyzeWordsShouldIgnoreBoringWords() { options.BoringWords = new[] { "first" }; wordsAnalyzer = new WordsAnalyzer(new Filter(options), wordReader); wordReader.AddWords(new [] { "first", "second" }); var words = wordsAnalyzer.AnalyzeWords(); words.Count.Should().Be(1); }
public void AnalyzeWordsShouldntBeSuccess_WenMystemLocationIncorrect() { options.MystemLocation = "incorrect"; wordsAnalyzer = new WordsAnalyzer(new Filter(options), wordReader); wordReader.AddWords(new[] { "first", "second" }); var words = wordsAnalyzer.AnalyzeWords(); words.IsSuccess.Should().BeFalse(); }
public void AnalyzeWordsShouldReturnEmpty_WhenNoWordsWereFound() { wordsAnalyzer.AnalyzeWords().Count.Should().Be(0); }
public void MakeTagCloud() { rectangleLayout.PlaceWords(wordsAnalyzer.AnalyzeWords()); rectangleLayout.DrawLayout(); }
public Result <None> MakeTagCloud() => wordsAnalyzer.AnalyzeWords() .Then(rectangleLayout.PlaceWords) .Then(_ => rectangleLayout.DrawLayout());