Package org.apache.cxf.test
Class AbstractCXFTest
java.lang.Object
org.apache.cxf.test.AbstractCXFTest
- Direct Known Subclasses:
AbstractCXFSpringTest
A basic test case meant for helping users unit test their services.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNamespace(String ns, String uri) Add a namespace that will be used for XPath expressions.assertInvalid(String xpath, Node node) Assert that the following XPath query selects no nodes.voidassertNoFault(Node node) Assert that this node is not a SOAP fault part.assertValid(String xpath, Node node) Assert that the following XPath query selects one or more nodes.voidassertValidBoolean(String xpath, Node node) Assert that the following XPath query selects a boolean value.voidassertXPathEquals(String xpath, String value, Node node) Assert that the text of the xpath node retrieved is equal to the value specified.voidassertXPathEquals(String xpath, QName value, Node node) Assert that the text of the xpath node retrieved is equal to the value specified.protected org.apache.cxf.Busstatic Stringorg.apache.cxf.BusgetBus()protected ReadergetResourceAsReader(String resource) protected InputStreamgetResourceAsStream(String resource) getTestFile(String relativePath) protected DocumentgetWSDLDocument(org.apache.cxf.endpoint.Server server) protected Nodeprotected byte[]invokeBytes(String address, String transport, String message) voidsetUpBus()void
-
Field Details
-
testUtilities
-
bus
protected org.apache.cxf.Bus bus
-
-
Constructor Details
-
AbstractCXFTest
protected AbstractCXFTest()
-
-
Method Details
-
setUpBus
- Throws:
Exception
-
getBus
public org.apache.cxf.Bus getBus() -
shutdownBus
public void shutdownBus() -
createBus
protected org.apache.cxf.Bus createBus() throws org.apache.cxf.BusException- Throws:
org.apache.cxf.BusException
-
invokeBytes
- Throws:
Exception
-
invoke
- Throws:
Exception
-
assertValid
Assert that the following XPath query selects one or more nodes.- Parameters:
xpath-- Throws:
Exception
-
assertValidBoolean
Assert that the following XPath query selects a boolean value.- Parameters:
xpath-- Throws:
Exception
-
assertInvalid
Assert that the following XPath query selects no nodes.- Parameters:
xpath-- Throws:
Exception
-
assertXPathEquals
Assert that the text of the xpath node retrieved is equal to the value specified.- Parameters:
xpath-value-node-- Throws:
Exception
-
assertXPathEquals
Assert that the text of the xpath node retrieved is equal to the value specified.- Parameters:
xpath-value-node-- Throws:
Exception
-
assertNoFault
Assert that this node is not a SOAP fault part.- Parameters:
node-- Throws:
Exception
-
addNamespace
Add a namespace that will be used for XPath expressions.- Parameters:
ns- Namespace name.uri- The namespace uri.
-
getNamespaceContext
-
getNamespaces
-
getResourceAsStream
-
getResourceAsReader
-
getTestFile
-
getBasedir
-
getWSDLDocument
protected Document getWSDLDocument(org.apache.cxf.endpoint.Server server) throws javax.wsdl.WSDLException - Throws:
javax.wsdl.WSDLException
-