示例#1
0
        public void SaveSvg_TestPlot_ValidSvgFile()
        {
            var plotModel = TestModels.CreateTestModel1();

            const string FileName = "PlotModelTests_Test1.svg";
            var          rc       = new ShapesRenderContext(null);
            var          svg      = plotModel.ToSvg(800, 500, false, rc);

            File.WriteAllText(FileName, svg);
            SvgAssert.IsValidFile(FileName);
        }
示例#2
0
        public void ToSvg_TestPlot_ValidSvgString()
        {
            var plotModel = TestModels.CreateTestModel1();

            var rc   = new ShapesRenderContext(null);
            var svg1 = plotModel.ToSvg(800, 500, true, rc);

            SvgAssert.IsValidDocument(svg1);
            var svg2 = plotModel.ToSvg(800, 500, false, rc);

            SvgAssert.IsValidElement(svg2);
        }