public abstract class BaseDOMTest extends BaseTest
| Modifier and Type | Field and Description |
|---|---|
private net.shibboleth.utilities.java.support.xml.BasicParserPool |
parserPool
Initialized parser pool used to parser data.
|
testingClass| Modifier | Constructor and Description |
|---|---|
protected |
BaseDOMTest(Class<?> clazz)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertXMLIdentical(Node expected,
Node actual)
Checks whether two nodes are identical based on
Diff.identical(). |
protected int |
countErrors(net.shibboleth.metadata.Item<Element> item) |
net.shibboleth.utilities.java.support.xml.ParserPool |
getParserPool()
Gets an initialized parser pool.
|
net.shibboleth.metadata.Item<Element> |
readDOMItem(String path)
Reads in an XML file and returns it as a new
DOMElementItem. |
Element |
readXMLData(String path)
Reads in an XML file, parses it, and returns the document element.
|
void |
setUp()
Setup test class.
|
classRelativeResource, getClasspathResource, packageRelativeResource, simpleClassRelativeNameprivate net.shibboleth.utilities.java.support.xml.BasicParserPool parserPool
protected BaseDOMTest(Class<?> clazz)
public void setUp()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
net.shibboleth.utilities.java.support.component.ComponentInitializationException - if there is a problem initializing the parser poolpublic net.shibboleth.utilities.java.support.xml.ParserPool getParserPool()
public Element readXMLData(String path) throws net.shibboleth.utilities.java.support.xml.XMLParserException
path - classpath path to the data file, never nullnet.shibboleth.utilities.java.support.xml.XMLParserException - thrown if the file does not exist or there is a problem parsing itpublic net.shibboleth.metadata.Item<Element> readDOMItem(String path) throws net.shibboleth.utilities.java.support.xml.XMLParserException
DOMElementItem.path - classpath path to the data file, never nullItem wrapping the document representing the data file, never nullXMLParserExceptionthrown - if the file does not exist or there is a problem parsing itnet.shibboleth.utilities.java.support.xml.XMLParserExceptionpublic void assertXMLIdentical(Node expected, Node actual)
Diff.identical().expected - the expected node against which the actual node will be tested, never nullactual - the actual node tested against the expected node, never nullprotected int countErrors(net.shibboleth.metadata.Item<Element> item)
Copyright © 1999–2016. All rights reserved.