org.apache.cxf.test
Class AbstractCXFTest
java.lang.Object
org.junit.Assert
org.apache.cxf.test.AbstractCXFTest
public class AbstractCXFTest
- extends org.junit.Assert
A basic test case meant for helping users unit test their services.
|
Field Summary |
protected Bus |
bus
|
|
Method Summary |
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)
|
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)
Asser that the text of the xpath node retrieved is equal to the value
specified. |
protected Bus |
createBus()
|
static java.lang.String |
getBasedir()
|
Bus |
getBus()
|
java.util.Map<java.lang.String,java.lang.String> |
getNamespaces()
|
protected java.io.Reader |
getResourceAsReader(java.lang.String resource)
|
protected java.io.InputStream |
getResourceAsStream(java.lang.String resource)
|
java.io.File |
getTestFile(java.lang.String relativePath)
|
protected org.w3c.dom.Document |
getWSDLDocument(Server server)
|
protected org.w3c.dom.Node |
invoke(java.lang.String address,
java.lang.String transport,
java.lang.String message)
|
protected byte[] |
invokeBytes(java.lang.String address,
java.lang.String transport,
java.lang.String message)
|
void |
setUpBus()
|
void |
shutdownBus()
|
| Methods inherited from class org.junit.Assert |
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bus
protected Bus bus
AbstractCXFTest
public AbstractCXFTest()
setUpBus
public void setUpBus()
throws java.lang.Exception
- Throws:
java.lang.Exception
getBus
public Bus getBus()
shutdownBus
public void shutdownBus()
createBus
protected Bus createBus()
throws BusException
- Throws:
BusException
invokeBytes
protected byte[] invokeBytes(java.lang.String address,
java.lang.String transport,
java.lang.String message)
throws java.lang.Exception
- Throws:
java.lang.Exception
invoke
protected org.w3c.dom.Node invoke(java.lang.String address,
java.lang.String transport,
java.lang.String message)
throws java.lang.Exception
- Throws:
java.lang.Exception
assertValid
public org.w3c.dom.NodeList assertValid(java.lang.String xpath,
org.w3c.dom.Node node)
throws java.lang.Exception
- Assert that the following XPath query selects one or more nodes.
- Parameters:
xpath -
- Throws:
java.lang.Exception
assertInvalid
public org.w3c.dom.NodeList assertInvalid(java.lang.String xpath,
org.w3c.dom.Node node)
throws java.lang.Exception
- Assert that the following XPath query selects no nodes.
- Parameters:
xpath -
- Throws:
java.lang.Exception
assertXPathEquals
public void assertXPathEquals(java.lang.String xpath,
java.lang.String value,
org.w3c.dom.Node node)
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 void assertNoFault(org.w3c.dom.Node node)
throws java.lang.Exception
- Throws:
java.lang.Exception
addNamespace
public void addNamespace(java.lang.String ns,
java.lang.String uri)
- Add a namespace that will be used for XPath expressions.
- Parameters:
ns - Namespace name.uri - The namespace uri.
getNamespaces
public java.util.Map<java.lang.String,java.lang.String> getNamespaces()
getResourceAsStream
protected java.io.InputStream getResourceAsStream(java.lang.String resource)
getResourceAsReader
protected java.io.Reader getResourceAsReader(java.lang.String resource)
getTestFile
public java.io.File getTestFile(java.lang.String relativePath)
getBasedir
public static java.lang.String getBasedir()
getWSDLDocument
protected org.w3c.dom.Document getWSDLDocument(Server server)
throws javax.wsdl.WSDLException
- Throws:
javax.wsdl.WSDLException
Apache CXF is an effort undergoing incubation at the Apache Software Foundation(ASF) and sponsored by the Apache Incubator PMC.