public void TestPDFCreator()
        {
            TryFunc <int, IEnumerable <Edge <int> > > tryGetPath = this.graph.ShortestPathsDijkstra(this.edgeCost, 0);
            DotGenerator <int, Edge <int> >           generator  = new DotGenerator <int, Edge <int> >(graph, tryGetPath);

            (new PDFGenerator(generator.GetDotCode(), "test.pdf")).GeneratePDF();
            FileAssert.Exists("test.pdf");
            File.Delete("test.pdf");
        }
Exemple #2
0
        public void PDFCreatorTest()
        {
            Matrix matrix = new Matrix(new int[, ] {
                { 0, 1, 2, 3 },
                { 1, 0, 1, 2 },
                { 2, 1, 0, 4 },
                { 3, 2, 4, 0 }
            });

            (this.graph, this.edgeCost) = GraphCreator.Create(matrix);
            TryFunc <int, IEnumerable <Edge <int> > > tryGetPath = graph.ShortestPathsDijkstra(this.edgeCost, 0);

            PdfGenerator.Generate(DotGenerator <int, Edge <int> > .GetDotCode(this.graph, tryGetPath), "test");
            Assert.IsTrue(File.Exists("test.pdf"));
            File.Delete("test.pdf");
        }