Overview of Assertions

Assertions enable you to verify variable data or process flow. You can perform the following types of assertions:

  • Entire XML document assertions:

    Compare the element values of an entire XML document to the expected element values. For example, compare the exact contents of an entire loan request XML document to another document. The XMLTestCase class in the XMLUnit package includes a collection of methods for performing assertions between XML files. For more information about these methods, visit the following URL:

    http://xmlunit.sourceforge.net
    
  • Part section of message assertions:

    Compare the values of a part section of a message to the expected values. An example is a payload part of an entire XML document message.

  • Nonleaf element assertions:

    Compare the values of an XML fragment to the expected values. An example is a loan application, which includes leaf elements SSN, email, customerName, and loanAmount.

  • Leaf element assertions:

    Compare the value of a selected string or number element or a regular expression pattern to an expected value. An example is the SSN of a loan application.

For more information about asserts, see Assertions.