Class XPathAssert


  • public final class XPathAssert
    extends Object
    XPath test assertions.
    • Method Detail

      • assertValidBoolean

        public static void assertValidBoolean​(String xpath,
                                              Node node,
                                              Map<String,​String> namespaces)
                                       throws Exception
        Assert that the following XPath query selects one or more nodes.
        Parameters:
        xpath -
        Throws:
        Exception
      • assertXPathEquals

        public static void assertXPathEquals​(String xpath,
                                             String value,
                                             Node node,
                                             Map<String,​String> namespaces)
                                      throws Exception
        Asser that the text of the xpath node retrieved is equal to the value specified.
        Parameters:
        xpath -
        value -
        node -
        Throws:
        Exception
      • assertXPathEquals

        public static void assertXPathEquals​(String xpath,
                                             QName value,
                                             Node node,
                                             Map<String,​String> namespaces)
                                      throws Exception
        Asser that the text of the xpath node retrieved is equal to the value specified.
        Parameters:
        xpath -
        value -
        node -
        Throws:
        Exception
      • createXPath

        public static XPath createXPath​(Map<String,​String> namespaces)
                                 throws Exception
        Create the specified XPath expression with the namespaces added via addNamespace().
        Throws:
        Exception