Advanced Search  :  Site Statistics  :  Directory  :  Web Resources  :  Polls  
    AccessPDF A PDF Forum for Users and Programmers    
 Welcome to AccessPDF
 Tuesday, May 13 2008 @ 03:15 PM PDT

JPdfUnit

   
Tools, Libs

hello all,

During the last 2 months i've developed a pdf testing lib.

JpdfUnit is a framework for testing a generated pdf document with the JUnit Test Framework so JPdfUnit is a high level api. The framework is designed for an easy access to the PDFBox library. This functionality provides the user a lot of possibilities in pdf document handling. For instance you can test the meta data of the pdf document like the author or the creation date or search for content via Strings, fragments of words or even regular expressions. Different simple ready-to-use assertions allow the user to compare the expected data to the concrete data of the pdf document. JPdfUnit is developed to test one pdf document. You have got three different kinds of using the framework i.e. you can inherit our DocumentTestCase shown in the example or you can work with our DocumentTester class to avoid inheritance from our framework. Here is a small example:

public class OioTest extends DocumentTestCase {
  public OioTest(String name) {
    super(name);
  }
  protected DocumentDataSource getDataSource() {
    DocumentDataSource datasource =
      new PdfDataSource("etc/testing-pdfs/DocumentInformationTest.pdf");
    return datasource;
  }
  public void testAssertAuthorsNameEquals() {
    assertAuthorsNameEquals("Benjamin Bratkus");
  }
}

I hope you enjoy it.

best regards,

ben
http://jpdfunit.sourceforge.net

 

What's Related

Story Options

 Copyright © 2008 AccessPDF
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.45 seconds