org.apache.cxf.test
Class XPathAssert

java.lang.Object
  extended by org.apache.cxf.test.XPathAssert

public final class XPathAssert
extends java.lang.Object

XPath test assertions.

Author:
Dan Diephouse

Method Summary
static void assertFault(org.w3c.dom.Node node)
           
static org.w3c.dom.NodeList assertInvalid(java.lang.String xpath, org.w3c.dom.Node node, java.util.Map<java.lang.String,java.lang.String> namespaces)
          Assert that the following XPath query selects no nodes.
static void assertNoFault(org.w3c.dom.Node node)
           
static org.w3c.dom.NodeList assertValid(java.lang.String xpath, org.w3c.dom.Node node, java.util.Map<java.lang.String,java.lang.String> namespaces)
          Assert that the following XPath query selects one or more nodes.
static void assertXPathEquals(java.lang.String xpath, java.lang.String value, org.w3c.dom.Node node, java.util.Map<java.lang.String,java.lang.String> namespaces)
          Asser that the text of the xpath node retrieved is equal to the value specified.
static javax.xml.xpath.XPath createXPath(java.util.Map<java.lang.String,java.lang.String> namespaces)
          Create the specified XPath expression with the namespaces added via addNamespace().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

assertValid

public static org.w3c.dom.NodeList assertValid(java.lang.String xpath,
                                               org.w3c.dom.Node node,
                                               java.util.Map<java.lang.String,java.lang.String> namespaces)
                                        throws java.lang.Exception
Assert that the following XPath query selects one or more nodes.

Parameters:
xpath -
Throws:
java.lang.Exception

assertInvalid

public static org.w3c.dom.NodeList assertInvalid(java.lang.String xpath,
                                                 org.w3c.dom.Node node,
                                                 java.util.Map<java.lang.String,java.lang.String> namespaces)
                                          throws java.lang.Exception
Assert that the following XPath query selects no nodes.

Parameters:
xpath -
Throws:
java.lang.Exception

assertXPathEquals

public static void assertXPathEquals(java.lang.String xpath,
                                     java.lang.String value,
                                     org.w3c.dom.Node node,
                                     java.util.Map<java.lang.String,java.lang.String> namespaces)
                              throws java.lang.Exception
Asser that the text of the xpath node retrieved is equal to the value specified.

Parameters:
xpath -
value -
node -
Throws:
java.lang.Exception

assertNoFault

public static void assertNoFault(org.w3c.dom.Node node)
                          throws java.lang.Exception
Throws:
java.lang.Exception

assertFault

public static void assertFault(org.w3c.dom.Node node)
                        throws java.lang.Exception
Throws:
java.lang.Exception

createXPath

public static javax.xml.xpath.XPath createXPath(java.util.Map<java.lang.String,java.lang.String> namespaces)
                                         throws java.lang.Exception
Create the specified XPath expression with the namespaces added via addNamespace().

Throws:
java.lang.Exception


Apache CXF