public Result <None> Execute(string[] args) { var filePath = string.Join(" ", args); var graphics = Graphics.FromImage(new Bitmap(1, 1)); var layouter = GetTagCloudLayouter(); return(fileReader.ReadLines(filePath) .Then(lines => wordFrequency.Get(lines)) .Then(frequencies => frequencies .OrderByDescending(x => x.Value) .Select(y => PlaceWord(y.Key, y.Value, layouter, graphics))) .Then(placedWords => tagCloudPainter.Paint(placedWords))); }
public void OnGet_CallWordCheckerOnEveryElement() { wordFrequency.Get(testData); A.CallTo(() => wordChecker.IsWordNotBoring(A <string> .Ignored)) .MustHaveHappenedANumberOfTimesMatching(x => x == testData.Length); }