Esempio n. 1
0
        public void Visualizate(string text, string picturePath)
        {
            var tagCloud = AlgorithmTagCloud.GetTagCloud(text, layoter, processor, metric);

            if (vizInfo.TryGetSize(out var size) && (size.Width < tagCloud.Width || size.Height < tagCloud.Height))
            {
                Console.WriteLine($"so small size, width and height should be more or equals: {tagCloud.Width}, {tagCloud.Height}");
                return;
            }
            TagCloudVisualization.Visualize(tagCloud, picturePath, vizInfo);
        }
Esempio n. 2
0
        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 visualizer = new TagCloudVisualization(cloudLayouter);
            var rectangles = cloudLayouter.Rectangles;

            visualizer.SaveRectanglesCloud(
                $"FailedOn{TestContext.CurrentContext.Test.Name}",
                TestContext.CurrentContext.TestDirectory,
                rectangles,
                center);
        }
Esempio n. 3
0
        public void Visualize(string text, string picturePath)
        {
            var tagCloud = AlgorithmTagCloud.GetTagCloud(text, layoter, processor, metric);

            TagCloudVisualization.Visualize(tagCloud, picturePath, vizInfo);
        }