Examples of ITextPDFWriter


Examples of fi.luomus.commons.pdf.ITextPDFWriter

    private PDFWriter      pdfWriter;
    private Map<String, String>  data;
   
    @Override
    protected void setUp() throws Exception {
      pdfWriter = new ITextPDFWriter(config.templateFolder(), config.pdfFolder());
      data = new HashMap<String, String>();
    }
View Full Code Here

Examples of fi.luomus.commons.pdf.ITextPDFWriter

    private File pdfFile(String file) {
      return new File(config.pdfFolder() + File.separator + file + ".pdf");
    }
   
    public void test__writing_a_pdf___not_found_template_folder() throws Exception {
      pdfWriter = new ITextPDFWriter("not_found_template_folder", config.pdfFolder());
      assertTrue("Writing pdf should fail", null == pdfWriter.writePdf("tarkastus", data, "test"));
      // assertEquals("ERROR: test.pdf : java.io.IOException: not_found_template_folder"+ File.separator + "tarkastus.pdf not found as file or resource.", pdfWriter.noticeTexts().get(0));
      //assertEquals("ERROR: test.pdf : java.io.IOException: not_found_template_folder" + "tarkastus.pdf not found as file or resource.", pdfWriter.noticeTexts().get(0));
      assertEquals("ERROR: test.pdf: java.io.FileNotFoundException: not_found_template_folder" + File.separator + "tarkastus.pdf (The system cannot find the path specified)", pdfWriter.noticeTexts().get(0));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.