Class HtmlTreeAsserts


  • public final class HtmlTreeAsserts
    extends Object
    Provides asserts for Document and Jdom elements.
    Author:
    Oliver Wolff
    • Method Detail

      • assertHtmlTreeEquals

        public static void assertHtmlTreeEquals​(org.jdom2.Document expected,
                                                org.jdom2.Document actual)
        Compares two instances of Document for equality. Attribute order is not relevant, but element order is.
        Parameters:
        expected - expected value
        actual - the value to check against expected
      • assertElementWithChildrenEquals

        public static void assertElementWithChildrenEquals​(org.jdom2.Element expected,
                                                           org.jdom2.Element actual,
                                                           String pointer)
        Compares two instances of Element for equality. Attribute order is not relevant.It checks the children recursively as well.
        Parameters:
        expected - expected value
        actual - the value to check against expected
        pointer - String based path identifier
      • assertElementEquals

        public static void assertElementEquals​(org.jdom2.Element expected,
                                               org.jdom2.Element actual,
                                               String pointer)
        Compares two instances of Element for equality. Attribute order is not relevant. It checks the name of the elements and the attributes, not the children
        Parameters:
        expected - expected value
        actual - actual the value to check against expected
        pointer - String based path identifier
      • assertAttributeEquals

        public static void assertAttributeEquals​(org.jdom2.Attribute expected,
                                                 org.jdom2.Attribute actual,
                                                 String pointer)
        Compares two instances of Attribute for equality.
        Parameters:
        expected - expected value
        actual - the value to check against expected
        pointer - String based path identifier