public void CreateNewTagCloud_ReturnCloudImage_WithSize(int rectangleWidth, int rectangleHeight, int expectedCloudImageWidth, int expextedCloudImageHeight) { tagCloud.PutNextRectangle(new Size(rectangleWidth, rectangleHeight)); var image = painter.CreateNewTagCloud(tagCloud); image.Size.Should().BeEquivalentTo(new Size(expectedCloudImageWidth, expextedCloudImageHeight)); }
public void TearDown() { if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Passed) { var directory = TestContext.CurrentContext.TestDirectory; var filename = TestContext.CurrentContext.Test.Name; var path = Path.GetFullPath($"{directory}\\..\\..\\FailedTestsImages\\{filename}.png"); var painter = new CloudPainter(); var image = painter.CreateNewTagCloud(tagCloud); TestContext.Out.WriteLine($"Tag cloud visualization saved to file {path}"); painter.SaveCloudImage(image, path); } }