public static void Main(string[] args) { var maxSize = new Size(80, 40); var minSize = new Size(40, 20); var rectangles = RectanglesGenerator.GenerateRectangles(10, maxSize, minSize); var image = CloudVisualizer.Visualize(rectangles.ToArray()); image.Save("../../layout4.png"); }
public void TearDown() { if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Failed) { return; } var test = TestContext.CurrentContext.Test; var layoutImage = CloudVisualizer.Visualize(_circularCloudLayouter.Rectangles.ToArray(), true); var pathToImage = $@"FallenTests\{test.MethodName}.{test.Name}.png"; var pathToDirectory = TestContext.CurrentContext.TestDirectory + @"\..\..\"; layoutImage.Save(pathToDirectory + pathToImage); TestContext.Write($"Layout saved to {pathToImage}"); }