public void TagMaker_ShouldGetSizeInDescendingOrder() { var dict = new Dictionary <string, int> { { "asfe", 6 }, { "ava", 2 }, { "sdfs", 1 } }; var dictRect = tagMaker.MakeCloud(dict, Size.Empty); dictRect.Select(rect => rect.Value.Height).Should().BeInDescendingOrder(); }
public void FromTextToImg(string inputPath, string imagePath, Size imageSize) { var englishWords = parser.Parse(inputPath); var goodEnglishWords = wordListUpdater.UpdateWordList(englishWords); var tagsList = getterFrequancy.GetProperty(goodEnglishWords); var tagsRectanglesDict = tagMaker.MakeCloud(tagsList, imageSize); var bitmap = cloudDrawer.Draw(tagsRectanglesDict); bitmap.Save(imagePath); }