public abstract class XoTestCase
extends junit.framework.TestCase
| Modifier and Type | Class and Description |
|---|---|
static class |
XoTestCase.NullResolver |
| Constructor and Description |
|---|
XoTestCase() |
| Modifier and Type | Method and Description |
|---|---|
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) |
NodeList |
assertValid(String xpath,
Node node)
Assert that the following XPath query selects one or more nodes.
|
void |
assertXPathEquals(String xpath,
String value,
Node node)
Asser that the text of the xpath node retrieved is equal to the value
specified.
|
static String |
getBasedir() |
protected Reader |
getResourceAsReader(String resource) |
protected InputStream |
getResourceAsStream(String resource) |
File |
getTestFile(String relativePath) |
protected XMLStreamReader |
getXSR(InputStream is) |
protected XMLStreamReader |
getXSR(String string) |
Document |
readDocument(byte[] b) |
static Document |
readXml(InputStream is)
Read XML as DOM.
|
void |
setUp() |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, tearDown, toStringpublic void setUp()
throws Exception
setUp in class junit.framework.TestCaseExceptionprotected XMLStreamReader getXSR(String string) throws XMLStreamException
XMLStreamExceptionprotected XMLStreamReader getXSR(InputStream is) throws XMLStreamException
XMLStreamExceptionpublic Document readDocument(byte[] b) throws SAXException, IOException, ParserConfigurationException
public static Document readXml(InputStream is) throws SAXException, IOException, ParserConfigurationException
public NodeList assertValid(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 addNamespace(String ns, String uri)
ns - Namespace name.uri - The namespace uri.protected InputStream getResourceAsStream(String resource)
public static String getBasedir()
Copyright © 2007–2021. All rights reserved.