Apache CXF API

org.apache.cxf.test
Class XPathAssert

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

public final class XPathAssert
extends Object

XPath test assertions.

Author:
Dan Diephouse

Method Summary
static void assertFault(Node node)
           
static NodeList assertInvalid(String xpath, Node node, Map<String,String> namespaces)
          Assert that the following XPath query selects no nodes.
static void assertNoFault(Node node)
           
static NodeList assertValid(String xpath, Node node, Map<String,String> namespaces)
          Assert that the following XPath query selects one or more nodes.
static void assertValidBoolean(String xpath, Node node, Map<String,String> namespaces)
          Assert that the following XPath query selects one or more nodes.
static void assertXPathEquals(String xpath, String value, Node node, Map<String,String> namespaces)
          Asser that the text of the xpath node retrieved is equal to the value specified.
static XPath createXPath(Map<String,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 NodeList assertValid(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

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

assertInvalid

public static NodeList assertInvalid(String xpath,
                                     Node node,
                                     Map<String,String> namespaces)
                              throws Exception
Assert that the following XPath query selects no 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

assertNoFault

public static void assertNoFault(Node node)
                          throws Exception
Throws:
Exception

assertFault

public static void assertFault(Node node)
                        throws Exception
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

Apache CXF API

Apache CXF