10.2.  File not Found

Error Message

# PDF document 'C:\daten\...\resources\XXX.pdf' could not be loaded.

Explanation

PDF documents and other files have to be found by the Java process (PDFUnit-Java) in the classpath.

Code with Error

lives_ok {
  my $pdfUnderTest = "$resources_dir/XXX.pdf";             # error, file does not exist
  AssertThat->document($pdfUnderTest)
            ->hasText()
  ;
} "typical error, file not found";;

Good Code

lives_ok {
  my $pdfUnderTest = "$resources_dir/doc-under-test.pdf";  #ok 
  AssertThat->document($pdfUnderTest)
            ->hasText()
  ;
} "no error, file exists";