Exemplo n.º 1
0
 public void CheckOnFailure()
 {
     if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
     {
         var visualizator = new Visualizator(new Size(1000, 1000));
         var dir          = TestContext.CurrentContext.TestDirectory + "\\FailedTests\\";
         var testName     = TestContext.CurrentContext.Test.Name;
         var path         = dir + testName + "_cloud.png";
         visualizator.DrawRectangles(cloudLayouter.Rectangles);
         visualizator.SaveImage(path);
         Console.WriteLine("Tag cloud visualization saved to file " + path);
     }
 }
Exemplo n.º 2
0
        public void drawingOnlyPositivePoints()
        {
            var cloudLayouter = new CircularCloudLayouter(new Point(0, 0));

            cloudLayouter.PutNextRectangle(new Size(50, 50));
            var visualizator = new Visualizator(new Size(50, 50));

            visualizator.DrawRectangles(cloudLayouter.Rectangles);
            for (var i = 0; i < 50; i++)
            {
                if (i < 24)
                {
                    visualizator.Image.GetPixel(i, 24).ShouldBeEqualTo(Color.FromArgb(255, 255, 140, 0));
                }
                else
                {
                    visualizator.Image.GetPixel(24, Math.Abs(i - 24)).ShouldBeEqualTo(Color.FromArgb(255, 255, 140, 0));
                }
            }
        }
Exemplo n.º 3
0
        public static void ShowCLZOfPoint(XYZ basePoint)
        {
            List <XYZ> CLZPoints = PointsConvertor.StepPointsToXYZByBasePoint(basePoint, CLZInfo.Points);

            Visualizator.ShowPoints(new PointsVisualizator(CLZPoints));
        }