|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cxf.test.TestUtilities
public class TestUtilities
This class provides unit test support for tests that look at generated WSDL contents.
Nested Class Summary | |
---|---|
static class |
TestUtilities.TestMessageObserver
|
Field Summary | |
---|---|
protected Bus |
bus
|
protected java.lang.Class<?> |
classpathAnchor
|
Constructor Summary | |
---|---|
TestUtilities(java.lang.Class<?> classpathReference)
This class provides utilities to several conflicting inheritance stacks of test support. |
Method Summary | |
---|---|
void |
addDefaultNamespaces()
|
void |
addNamespace(java.lang.String ns,
java.lang.String uri)
Add a namespace that will be used for XPath expressions. |
org.w3c.dom.NodeList |
assertInvalid(java.lang.String xpath,
org.w3c.dom.Node node)
Assert that the following XPath query selects no nodes. |
void |
assertNoFault(org.w3c.dom.Node node)
Assert that this node is not a Soap fault body. |
org.w3c.dom.NodeList |
assertValid(java.lang.String xpath,
org.w3c.dom.Node node)
Assert that the following XPath query selects one or more nodes. |
void |
assertXPathEquals(java.lang.String xpath,
java.lang.String value,
org.w3c.dom.Node node)
Assert that the text of the xpath node retrieved is equal to the value specified. |
static java.lang.String |
getBasedir()
|
Bus |
getBus()
Return the CXF bus used. |
java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
retrieve the entire namespace map. |
java.io.Reader |
getResourceAsReader(java.lang.String resource)
|
java.io.InputStream |
getResourceAsStream(java.lang.String resource)
|
Server |
getServerForService(javax.xml.namespace.QName serviceName)
|
java.io.File |
getTestFile(java.lang.String relativePath)
|
javax.wsdl.Definition |
getWSDLDefinition(Server server)
Return a WSDL definition model for a server. |
org.w3c.dom.Document |
getWSDLDocument(Server server)
Return a DOM tree for the WSDL for a server. |
org.w3c.dom.Node |
invoke(java.lang.String address,
java.lang.String transport,
java.lang.String message)
|
byte[] |
invokeBytes(java.lang.String address,
java.lang.String transport,
java.lang.String message)
|
static void |
recoverKeepAliveSystemProperty()
|
void |
setBus(Bus bus)
Set the CXF bus. |
static void |
setKeepAliveSystemProperty(boolean setAlive)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Bus bus
protected java.lang.Class<?> classpathAnchor
Constructor Detail |
---|
public TestUtilities(java.lang.Class<?> classpathReference)
classpathReference
- Method Detail |
---|
public static void setKeepAliveSystemProperty(boolean setAlive)
public static void recoverKeepAliveSystemProperty()
public void addDefaultNamespaces()
public org.w3c.dom.NodeList assertValid(java.lang.String xpath, org.w3c.dom.Node node) throws java.lang.Exception
xpath
-
java.lang.Exception
public org.w3c.dom.NodeList assertInvalid(java.lang.String xpath, org.w3c.dom.Node node) throws java.lang.Exception
xpath
-
java.lang.Exception
public void assertXPathEquals(java.lang.String xpath, java.lang.String value, org.w3c.dom.Node node) throws java.lang.Exception
xpath
- value
- node
-
java.lang.Exception
public void assertNoFault(org.w3c.dom.Node node) throws java.lang.Exception
node
-
java.lang.Exception
public byte[] invokeBytes(java.lang.String address, java.lang.String transport, java.lang.String message) throws java.lang.Exception
java.lang.Exception
public org.w3c.dom.Node invoke(java.lang.String address, java.lang.String transport, java.lang.String message) throws java.lang.Exception
java.lang.Exception
public java.io.InputStream getResourceAsStream(java.lang.String resource)
public java.io.Reader getResourceAsReader(java.lang.String resource)
public java.io.File getTestFile(java.lang.String relativePath)
public static java.lang.String getBasedir()
public org.w3c.dom.Document getWSDLDocument(Server server) throws javax.wsdl.WSDLException
server
- the server.
javax.wsdl.WSDLException
public javax.wsdl.Definition getWSDLDefinition(Server server) throws javax.wsdl.WSDLException
server
- the server.
javax.wsdl.WSDLException
public Server getServerForService(javax.xml.namespace.QName serviceName) throws javax.wsdl.WSDLException
javax.wsdl.WSDLException
public void addNamespace(java.lang.String ns, java.lang.String uri)
ns
- Namespace name.uri
- The namespace uri.public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
public Bus getBus()
public void setBus(Bus bus)
bus
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |