public class TestUtilities extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TestUtilities.TestMessageObserver |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.cxf.Bus |
bus |
protected Class<?> |
classpathAnchor |
| Constructor and Description |
|---|
TestUtilities(Class<?> classpathReference)
This class provides utilities to several conflicting inheritance stacks
of test support.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultNamespaces() |
void |
addNamespace(String ns,
String uri)
Add a namespace that will be used for XPath expressions.
|
NodeList |
assertInvalid(String xpath,
Node node)
Assert that the following XPath query selects no nodes.
|
void |
assertNoFault(Node node)
Assert that this node is not a Soap fault body.
|
NodeList |
assertValid(String xpath,
Node node)
Assert that the following XPath query selects one or more nodes.
|
void |
assertValidBoolean(String xpath,
Node node)
Assert that the following XPath query selects a boolean value.
|
void |
assertXPathEquals(String xpath,
QName value,
Node node)
Assert that the text of the xpath node retrieved is equal to the value
specified.
|
void |
assertXPathEquals(String xpath,
String value,
Node node)
Assert that the text of the xpath node retrieved is equal to the value
specified.
|
static boolean |
checkUnrestrictedPoliciesInstalled() |
static String |
getBasedir() |
org.apache.cxf.Bus |
getBus()
Return the CXF bus used.
|
Map<String,String> |
getNamespaces()
retrieve the entire namespace map.
|
Reader |
getResourceAsReader(String resource) |
InputStream |
getResourceAsStream(String resource) |
org.apache.cxf.endpoint.Server |
getServerForAddress(String address) |
org.apache.cxf.endpoint.Server |
getServerForService(QName serviceName) |
File |
getTestFile(String relativePath) |
javax.wsdl.Definition |
getWSDLDefinition(org.apache.cxf.endpoint.Server server)
Return a WSDL definition model for a server.
|
Document |
getWSDLDocument(org.apache.cxf.endpoint.Server server)
Return a DOM tree for the WSDL for a server.
|
Node |
invoke(String address,
String transport,
String message) |
byte[] |
invokeBytes(String address,
String transport,
String message) |
static void |
recoverKeepAliveSystemProperty() |
String |
resolveNamespacePrefix(String prefix,
Node node)
Handy function for checking correctness of qualifies names in schema attribute values.
|
void |
setBus(org.apache.cxf.Bus bus)
Set the CXF bus.
|
static void |
setKeepAliveSystemProperty(boolean setAlive) |
protected org.apache.cxf.Bus bus
protected Class<?> classpathAnchor
public TestUtilities(Class<?> classpathReference)
classpathReference - public static void setKeepAliveSystemProperty(boolean setAlive)
public static void recoverKeepAliveSystemProperty()
public void addDefaultNamespaces()
public String resolveNamespacePrefix(String prefix, Node node) throws Exception
prefix - node - Exceptionpublic NodeList assertValid(String xpath, Node node) throws Exception
xpath - Exceptionpublic void assertValidBoolean(String xpath, Node node) throws Exception
xpath - Exceptionpublic NodeList assertInvalid(String xpath, Node node) throws Exception
xpath - Exceptionpublic void assertXPathEquals(String xpath, String value, Node node) throws Exception
xpath - value - node - Exceptionpublic void assertXPathEquals(String xpath, QName value, Node node) throws Exception
xpath - value - node - Exceptionpublic void assertNoFault(Node node) throws Exception
node - Exceptionpublic byte[] invokeBytes(String address, String transport, String message) throws Exception
Exceptionpublic Node invoke(String address, String transport, String message) throws Exception
Exceptionpublic InputStream getResourceAsStream(String resource)
public static String getBasedir()
public Document getWSDLDocument(org.apache.cxf.endpoint.Server server) throws javax.wsdl.WSDLException
server - the server.javax.wsdl.WSDLExceptionpublic javax.wsdl.Definition getWSDLDefinition(org.apache.cxf.endpoint.Server server)
throws javax.wsdl.WSDLException
server - the server.javax.wsdl.WSDLExceptionpublic org.apache.cxf.endpoint.Server getServerForService(QName serviceName) throws javax.wsdl.WSDLException
javax.wsdl.WSDLExceptionpublic org.apache.cxf.endpoint.Server getServerForAddress(String address) throws javax.wsdl.WSDLException
javax.wsdl.WSDLExceptionpublic void addNamespace(String ns, String uri)
ns - Namespace name.uri - The namespace uri.public org.apache.cxf.Bus getBus()
public void setBus(org.apache.cxf.Bus bus)
bus - public static boolean checkUnrestrictedPoliciesInstalled()
Apache CXF