Chapter 7. PDFUnit for Non-Java Systems

7.1.  A quick Look at PDFUnit-NET

A 'PDFUnit-NET' version for a .NET environment is provided since December 2015.

[TestMethod]
public void HasAuthor()
{
  String filename = "documentUnderTest.pdf";
  AssertThat.document(filename)
            .hasAuthor()
            .matchingExact("PDFUnit.com")
  ;
}
[TestMethod]
[ExpectedException(typeof(PDFUnitValidationException))]
public void HasAuthor_StartingWith_WrongString() 
{
  String filename = "documentUnderTest.pdf";
  AssertThat.document(filename)
            .hasAuthor()
            .startingWith("wrong_sequence_intended")
  ;
}

PDFUnit-NET is fully compatible to PDFUnit-Java because a DLL is generated from the Java version. However, this means that method names in C# begin with lowercase letters.

PDFUnit-NET comes with an own manual.