public virtual void DrawOnPageAllNullTest2()
 {
     NUnit.Framework.Assert.That(() => {
         SvgConverter.DrawOnPage((Stream)null, null);
     }
                                 , NUnit.Framework.Throws.InstanceOf <SvgProcessingException>())
     ;
 }
Esempio n. 2
0
        public virtual void DrawStreamOnPageWithPropsCreatesResourceTest()
        {
            PdfPage page = doc.AddNewPage();

            SvgConverter.DrawOnPage(@is, page, new DummySvgConverterProperties());
            NUnit.Framework.Assert.AreEqual(0, doc.GetFirstPage().GetResources().GetPdfObject().Size());
            TestResourceCreated(doc, 2);
        }
Esempio n. 3
0
        public virtual void DrawStringOnPageCreatesResourceTest()
        {
            PdfPage page = doc.AddNewPage();

            SvgConverter.DrawOnPage(content, page);
            NUnit.Framework.Assert.AreEqual(0, doc.GetFirstPage().GetResources().GetPdfObject().Size());
            TestResourceCreated(doc, 2);
        }
 public virtual void DrawOnPageInputStreamNullTest()
 {
     NUnit.Framework.Assert.That(() => {
         PdfPage page = doc.GetFirstPage();
         SvgConverter.DrawOnPage((Stream)null, page);
     }
                                 , NUnit.Framework.Throws.InstanceOf <SvgProcessingException>())
     ;
 }
Esempio n. 5
0
        public virtual void DrawOnPageStringPage()
        {
            String      name     = "eclipse";
            String      destName = "DOP_" + name + "_StringPdfPage";
            PdfDocument doc      = new PdfDocument(new PdfWriter(destinationFolder + destName + ".pdf"));
            PdfPage     page     = doc.AddNewPage();

            SvgConverter.DrawOnPage(ECLIPSESVGSTRING, page);
            doc.Close();
            NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(destinationFolder + destName + ".pdf", sourceFolder
                                                                             + "cmp_" + destName + ".pdf", destinationFolder, "diff_"));
        }
Esempio n. 6
0
        public virtual void DrawOnPageStreamPage()
        {
            String      name     = "eclipse";
            String      destName = "DOP_" + name + "_StreamPdfPage";
            FileStream  fis      = new FileStream(sourceFolder + name + ".svg", FileMode.Open, FileAccess.Read);
            PdfDocument doc      = new PdfDocument(new PdfWriter(destinationFolder + destName + ".pdf"));
            PdfPage     page     = doc.AddNewPage();

            SvgConverter.DrawOnPage(fis, page);
            doc.Close();
            NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(destinationFolder + destName + ".pdf", sourceFolder
                                                                             + "cmp_" + destName + ".pdf", destinationFolder, "diff_"));
        }
        public virtual void DrawOnPageInputStreamPropsNullTest()
        {
            PdfPage page = doc.GetFirstPage();

            SvgConverter.DrawOnPage(@is, page, null);
        }
        public virtual void DrawOnPageStringPropsNullTest()
        {
            PdfPage page = doc.GetFirstPage();

            SvgConverter.DrawOnPage(content, page, null);
        }