public TagCloudCreator( IEnumerable <IWordPreparer> preparers, ITagCloudStatsGenerator generator, TagCloudImageCreator imageCreator) { this.preparers = preparers; this.generator = generator; this.imageCreator = imageCreator; }
public static void Main(string[] args) { var circularCloudLayouter = new CircularCloudLayouter(new Point(500, 500)); for (var i = 0; i < 50; i++) { circularCloudLayouter.PutNextRectangle(new Size(50 + i, 50 - i)); } var cloudImageCreator = new TagCloudImageCreator(circularCloudLayouter); cloudImageCreator.Save(); }
public void TearDown() { if (!Directory.Exists($@"C:\\TagCloudTests")) { Directory.CreateDirectory($@"C:\\TagCloudTests"); } if (TestContext.CurrentContext.Result.Outcome != ResultState.Failure) { return; } var tagCloudImageCreator = new TagCloudImageCreator(circularCloudLayouter); var testName = TestContext.CurrentContext.Test.FullName; var path = $@"C:\\TagCloudTests\{testName}.jpg"; tagCloudImageCreator.Save(path); Console.WriteLine($"Tag cloud visualization saved to file {path}"); }