4.17. More Comparisons

In the previous chapters a lot of examples show how to compare various parts of two PDF documents. But PDFUnit provides more methods for comparing PDF. The following list shows the remaining methods. They should be self explanatory:

// Various methods, comparing PDF. Not described before:


Concatenation of Test Methods

All methods can be concatenated:

public void haveSameAuthorTitle() throws Exception {
  String filenameTest = "documentUnderTest.pdf";
  String filenameReference = "reference.pdf";

This example is only a syntax demo. In real projects you should separate the test into two tests, each with a meaningful name.