4.15.  Comparing Quantities of PDF Elements

The number of various items in a test document can be compared with the number of the same items in a master document.

Even if some of these tests are already described in other chapters, the following list gives an overview of all tags comparing countable components:

<!-- Tags to compare countable items in two PDF documents: -->

<haveSameNumberOfActions       />
<haveSameNumberOfBookmarks     />
<haveSameNumberOfEmbeddedFiles />
<haveSameNumberOfFields        />
<haveSameNumberOfFonts         />
<haveSameNumberOfImages        />
<haveSameNumberOfLayers        />
<haveSameNumberOfPages         />
<haveSameNumberOfTaggingInfo   />

Here is a small sample which is not shown in other chapters:

<testcase name="haveSameNumberOfPages">
  <assertThat testDocument="test/test.pdf"
              masterDocument="master/master.pdf"
  >
    <haveSameNumberOfPages />
  </assertThat>
</testcase>
<testcase name="haveSameNumberOfTaggingInfo">
  <assertThat testDocument="test/test.pdf"
              masterDocument="master/master.pdf"
  >
    <haveSameNumberOfTaggingInfo />
  </assertThat>
</testcase>
<testcase name="haveSameNumberOfLayers">
  <assertThat testDocument="test/test.pdf"
              masterDocument="master/master.pdf"
  >
    <haveSameNumberOfLayers />
  </assertThat>
</testcase>