Prev |  | Next

## 13.13. Running PDFUnit with TestNG

PDFUnit also runs with TestNG.

If you only use the annotation `@Test` no difference can be seen. Only when you expect exceptions you can see it's TestNG:

    @Test(expectedExceptions=PDFUnitValidationException.class)
    public void hasAuthor_NoAuthorInPDF() throws Exception {
      String filename = "documentUnderTest.pdf";

      AssertThat.document(filename)
                .hasAuthor()
      ;
    }

Prev | Up | Next
13.12. JAXP-Configuration | Home | 13.14. Version History