10.4.  Name of the Former CEO

Initial Situation

The board of executives has changed again.

Problem

The name of the former CEO must be changed in the header of newly created PDF documents.

Solution Approach

PDFUnit provides a tag to check documents for the non-existence of text.

Solution

<!-- 
  This example shows how to verify that an expected text
  is not present in the complete document.
-->
<testcase name="verifyOldCEONotPresent">
  <assertThat testDocument="content/diverseContentOnMultiplePages.pdf">
    <hasText on="EVERY_PAGE">
      <notContaining>NameOfOldCEO</notContaining>
    </hasText>
  </assertThat>
</testcase>