|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.metadata.dom.BaseDomTest
public abstract class BaseDomTest
A base class for DOM related tests.
| Field Summary | |
|---|---|
private net.shibboleth.utilities.java.support.xml.BasicParserPool |
parserPool
Initialized parser pool used to parser data. |
| Constructor Summary | |
|---|---|
BaseDomTest()
|
|
| Method Summary | |
|---|---|
void |
assertXmlIdentical(Node expected,
Node actual)
Checks whether two nodes are identical based on Diff.identical(). |
net.shibboleth.utilities.java.support.xml.ParserPool |
getParserPool()
Gets an initialized parser pool. |
Element |
readTestRelativeXmlData(Class classBeingTested,
String dataFile)
Parses and XML data file located in the resource directory named for the class that is being tested. |
Element |
readXmlData(String path)
Reads in an XML file, parses it, and returns the document element. |
void |
setUp()
Setup test class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private net.shibboleth.utilities.java.support.xml.BasicParserPool parserPool
| Constructor Detail |
|---|
public BaseDomTest()
| Method Detail |
|---|
public void setUp()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
net.shibboleth.utilities.java.support.component.ComponentInitializationException - thrown if there is a problem initializing the parser poolpublic net.shibboleth.utilities.java.support.xml.ParserPool getParserPool()
public Element readTestRelativeXmlData(Class classBeingTested,
String dataFile)
throws net.shibboleth.utilities.java.support.xml.XMLParserException
net.shibboleth.metadata.dom.saml.RemoveContactPersonStage, the data file will be
looked for in src/test/resources/net/shibboleth/metadata/dom/saml/RemoveContactPersonStage/.
classBeingTested - the class that is being unit testeddataFile - the data file to be loaded in and read
net.shibboleth.utilities.java.support.xml.XMLParserException - thrown if the data file does not exist or is not valid XML
public Element readXmlData(String path)
throws net.shibboleth.utilities.java.support.xml.XMLParserException
path - classpath path to the data file, never null
net.shibboleth.utilities.java.support.xml.XMLParserException - thrown if the file does not exists or there is a problem parsing it
public 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 null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||