Example #1
0
        protected void TearDown()
        {
            if (TestContext.CurrentContext.Result.Outcome.Status != TestStatus.Failed)
            {
                return;
            }
            var fileName = $"{TestContext.CurrentContext.Test.FullName}.png";

            DrawOriginOrientedRectangles(
                new Size(imgWidth, imgHeight),
                CloudLayoutCreator
                .GetAllRectangles()
                .Select(rect =>
                        new Rectangle(imgWidth / 2 + rect.X, imgHeight / 2 + rect.Y, rect.Width, rect.Height)),
                fileName);
            TestContext.WriteLine($"Tag cloud visualisation saved to file: '{fileName}'");
        }
Example #2
0
 private static int GetMaxYCoordinate(this CircularCloudLayoutCreator layoutCreator)
 {
     return(layoutCreator.GetAllRectangles().Max(r => r.Y + r.Height));
 }