static void Main() { var layout = new CircularCloudLayouter(new Point(200, 200)); var random = new Random(); for (int i = 1; i < 50; i++) { layout.PutNextRectangle(new Size(random.Next(30, 60), random.Next(20, 60))); } CircularCloudVisualization.SaveImageFromLayout("Test", layout); }
public static void SaveImageOfWrongTestCase() { if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Failed) { return; } var directory = TestContext.CurrentContext.TestDirectory; var path = $"{directory}\\..\\..\\Images\\FailedOn{TestContext.CurrentContext.Test.Name}.png"; TestContext.Out.WriteLine($"Tag cloud visualization saved to file {path}"); var bitmap = CircularCloudVisualization.GetBitmapWithRectangles(cloudLayouter); bitmap.Save(path, ImageFormat.Png); }