示例#1
0
文件: Program.cs 项目: Saylala/tdd
        static void Main(string[] args)
        {
            var testNumber = double.Parse(args[0]);
            var layouter   = new CircularCloudLayouter(new Point(500, 500));
            var testData   = CreateLayout(layouter, 500);
            var visualiser = new CloudVisualizer(layouter.CloudBorder.Size);

            visualiser.Visualise(testData, $"test{testNumber}.png");
            Process.Start($"test{testNumber}.png");
        }
示例#2
0
        static void Main(string[] args)
        {
            var width      = 1;
            var intesity   = double.Parse(args[0]);
            var visualiser = new CloudVisualizer();
            var layouter   = new CircularCloudLayouter(new Point(500, 500), intesity, new Size(1000, 1000));
            var testData   = MakeData(layouter, 150, width);

            visualiser.Visualise(testData, $"test{intesity}.png");
        }
示例#3
0
        public void TearDown()
        {
            if (!Equals(TestContext.CurrentContext.Result.Outcome, ResultState.Failure))
            {
                return;
            }
            var visualiser = new CloudVisualizer(cloudLayouter.CloudBorder.Size);
            var data       = cloudLayouter.GetRectangles();
            var name       = TestContext.CurrentContext.Test.Name + ".png";
            var path       = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, name);

            visualiser.Visualise(data, path);
            Console.WriteLine($"Tag cloud visualization saved to file {name}");
        }