Class DOMComparer


  • public class DOMComparer
    extends Object
    This class allows to compare two Document objects and save the differences in a list.
    Author:
    beze232056
    • Field Detail

      • controlDOM

        private final Document controlDOM
        The control document. This is used as a base to compare the testDOM with.
      • testDOM

        private final Document testDOM
        The test document. This is the document in which we want to detect differences.
    • Constructor Detail

      • DOMComparer

        public DOMComparer​(Document controlDOM,
                           Document testDOM)
        Constructor.
        Parameters:
        controlDOM - The control DOM.
        testDOM - The test DOM.
    • Method Detail

      • compare

        public List<org.custommonkey.xmlunit.Difference> compare()
        Compare the controlDOM and testDOM and save and return the differences in a list.
        Returns:
        list with differences