public abstract class XMLTestCase extends junit.framework.TestCase implements XSLTConstants
XMLAssert
class.
NB: All underlying similarity and difference testing is done using Diff
instances which can be instantiated and evaluated independently of
an XMLTestCase.Diff.similar()
,
Diff.identical()
JAVA5_XSLTC_FACTORY_NAME, XSLT_END, XSLT_IDENTITY_TEMPLATE, XSLT_START, XSLT_START_NO_VERSION, XSLT_STRIP_COMMENTS_TEMPLATE, XSLT_STRIP_WHITESPACE, XSLT_XML_OUTPUT_NOINDENT
CLOSE_NODE, END_CDATA, END_COMMENT, END_PROCESSING_INSTRUCTION, NULL_NS_URI, OPEN_END_NODE, OPEN_START_NODE, START_CDATA, START_COMMENT, START_DOCTYPE, START_PROCESSING_INSTRUCTION, W3C_XML_SCHEMA_INSTANCE_NO_NAMESPACE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_INSTANCE_NS_URI, W3C_XML_SCHEMA_INSTANCE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_NS_URI, XML_DECLARATION, XMLNS_PREFIX, XPATH_ATTRIBUTE_IDENTIFIER, XPATH_CHARACTER_NODE_IDENTIFIER, XPATH_COMMENT_IDENTIFIER, XPATH_NODE_INDEX_END, XPATH_NODE_INDEX_START, XPATH_PROCESSING_INSTRUCTION_IDENTIFIER, XPATH_SEPARATOR
Constructor and Description |
---|
XMLTestCase()
Construct a new XML test case.
|
XMLTestCase(String name)
Construct a new test case.
|
Modifier and Type | Method and Description |
---|---|
void |
assertNodeTestPasses(InputSource xml,
NodeTester tester,
short nodeType)
Execute a
NodeTest for a single node type
and assert that it passes |
void |
assertNodeTestPasses(NodeTest test,
NodeTester tester,
short[] nodeTypes,
boolean assertion)
Execute a
NodeTest for multiple node types and make an
assertion about it whether it is expected to pass |
void |
assertNodeTestPasses(String xmlString,
NodeTester tester,
short nodeType)
Execute a
NodeTest for a single node type
and assert that it passes |
void |
assertXMLEqual(Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not similar.
|
void |
assertXMLEqual(Document control,
Document test)
Assert that two XML documents are similar
|
void |
assertXMLEqual(InputSource control,
InputSource test)
Assert that two XML documents are similar
|
void |
assertXMLEqual(Reader control,
Reader test)
Assert that two XML documents are similar
|
void |
assertXMLEqual(String msg,
Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not similar.
|
void |
assertXMLEqual(String err,
Document control,
Document test)
Assert that two XML documents are similar
|
void |
assertXMLEqual(String err,
InputSource control,
InputSource test)
Assert that two XML documents are similar
|
void |
assertXMLEqual(String err,
Reader control,
Reader test)
Assert that two XML documents are similar
|
void |
assertXMLEqual(String control,
String test)
Assert that two XML documents are similar
|
void |
assertXMLEqual(String err,
String control,
String test)
Assert that two XML documents are similar
|
void |
assertXMLIdentical(Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not identical
|
void |
assertXMLIdentical(String msg,
Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not identical
|
void |
assertXMLNotEqual(Document control,
Document test)
Assert that two XML documents are NOT similar
|
void |
assertXMLNotEqual(InputSource control,
InputSource test)
Assert that two XML documents are NOT similar
|
void |
assertXMLNotEqual(Reader control,
Reader test)
Assert that two XML documents are NOT similar
|
void |
assertXMLNotEqual(String err,
Document control,
Document test)
Assert that two XML documents are NOT similar
|
void |
assertXMLNotEqual(String err,
InputSource control,
InputSource test)
Assert that two XML documents are NOT similar
|
void |
assertXMLNotEqual(String err,
Reader control,
Reader test)
Assert that two XML documents are NOT similar
|
void |
assertXMLNotEqual(String control,
String test)
Assert that two XML documents are NOT similar
|
void |
assertXMLNotEqual(String err,
String control,
String test)
Assert that two XML documents are NOT similar
|
void |
assertXMLValid(InputSource xml)
Assert that a piece of XML contains valid XML: the input must
contain a DOCTYPE declaration to be validated
|
void |
assertXMLValid(InputSource xml,
String systemId)
Assert that a piece of XML contains valid XML: the document must
contain a DOCTYPE to be validated, but the validation will use the
systemId to obtain the DTD
|
void |
assertXMLValid(InputSource xml,
String systemId,
String doctype)
Assert that a piece of XML contains valid XML: the document
will be given a DOCTYPE to be validated with the name and
systemId specified regardless of whether it already contains a
doctype declaration.
|
void |
assertXMLValid(String xmlString)
Assert that a String containing XML contains valid XML: the String must
contain a DOCTYPE declaration to be validated
|
void |
assertXMLValid(String xmlString,
String systemId)
Assert that a String containing XML contains valid XML: the String must
contain a DOCTYPE to be validated, but the validation will use the
systemId to obtain the DTD
|
void |
assertXMLValid(String xmlString,
String systemId,
String doctype)
Assert that a String containing XML contains valid XML: the String will
be given a DOCTYPE to be validated with the name and systemId specified
regardless of whether it already contains a doctype declaration.
|
void |
assertXMLValid(Validator validator)
Assert that a Validator instance returns
isValid() == true |
void |
assertXpathEvaluatesTo(String expectedValue,
String xpathExpression,
Document inDocument)
Assert the value of an Xpath expression in an DOM Document
|
void |
assertXpathEvaluatesTo(String expectedValue,
String xpathExpression,
InputSource control)
Assert the value of an Xpath expression in an XML String
|
void |
assertXpathEvaluatesTo(String expectedValue,
String xpathExpression,
String inXMLString)
Assert the value of an Xpath expression in an XML String
|
void |
assertXpathExists(String xPathExpression,
Document inDocument)
Assert that a specific XPath exists in some given XML
|
void |
assertXpathExists(String xPathExpression,
InputSource xml)
Assert that a specific XPath exists in some given XML
|
void |
assertXpathExists(String xPathExpression,
String inXMLString)
Assert that a specific XPath exists in some given XML
|
void |
assertXpathNotExists(String xPathExpression,
Document inDocument)
Assert that a specific XPath does NOT exist in some given XML
|
void |
assertXpathNotExists(String xPathExpression,
InputSource xml)
Assert that a specific XPath does NOT exist in some given XML
|
void |
assertXpathNotExists(String xPathExpression,
String inXMLString)
Assert that a specific XPath does NOT exist in some given XML
|
void |
assertXpathsEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the node lists of two Xpaths in two documents are equal
|
void |
assertXpathsEqual(String controlXpath,
InputSource control,
String testXpath,
InputSource test)
Assert that the node lists of two Xpaths in two XML pieces are equal
|
void |
assertXpathsEqual(String controlXpath,
String testXpath,
Document document)
Assert that the node lists of two Xpaths in the same document are equal
|
void |
assertXpathsEqual(String controlXpath,
String testXpath,
InputSource document)
Assert that the node lists of two Xpaths in the same document are equal
|
void |
assertXpathsEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the node lists of two Xpaths in the same XML string are
equal
|
void |
assertXpathsEqual(String controlXpath,
String inControlXMLString,
String testXpath,
String inTestXMLString)
Assert that the node lists of two Xpaths in two XML strings are equal
|
void |
assertXpathsNotEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the node lists of two Xpaths in two documents are NOT equal
|
void |
assertXpathsNotEqual(String controlXpath,
InputSource control,
String testXpath,
InputSource test)
Assert that the node lists of two Xpaths in two pieces of XML
are NOT equal
|
void |
assertXpathsNotEqual(String controlXpath,
String testXpath,
Document document)
Assert that the node lists of two Xpaths in the same document are NOT equal
|
void |
assertXpathsNotEqual(String controlXpath,
String testXpath,
InputSource control)
Assert that the node lists of two Xpaths in the same XML are NOT
equal
|
void |
assertXpathsNotEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the node lists of two Xpaths in the same XML string are NOT
equal
|
void |
assertXpathsNotEqual(String controlXpath,
String inControlXMLString,
String testXpath,
String inTestXMLString)
Assert that the node lists of two Xpaths in two XML strings are NOT equal
|
void |
assertXpathValuesEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the evaluation of two Xpaths in two documents are equal
|
void |
assertXpathValuesEqual(String controlXpath,
InputSource control,
String testXpath,
InputSource test)
Assert that the evaluation of two Xpaths in two XML strings are equal
|
void |
assertXpathValuesEqual(String controlXpath,
String testXpath,
Document document)
Assert that the evaluation of two Xpaths in the same document are equal
|
void |
assertXpathValuesEqual(String controlXpath,
String testXpath,
InputSource control)
Assert that the evaluation of two Xpaths in the same XML are
equal
|
void |
assertXpathValuesEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the evaluation of two Xpaths in the same XML string are
equal
|
void |
assertXpathValuesEqual(String controlXpath,
String inControlXMLString,
String testXpath,
String inTestXMLString)
Assert that the evaluation of two Xpaths in two XML strings are equal
|
void |
assertXpathValuesNotEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the evaluation of two Xpaths in two documents are
NOT equal
|
void |
assertXpathValuesNotEqual(String controlXpath,
InputSource control,
String testXpath,
InputSource test)
Assert that the evaluation of two Xpaths in two XML strings are
NOT equal
|
void |
assertXpathValuesNotEqual(String controlXpath,
String testXpath,
Document document)
Assert that the evaluation of two Xpaths in the same document are
NOT equal
|
void |
assertXpathValuesNotEqual(String controlXpath,
String testXpath,
InputSource control)
Assert that the evaluation of two Xpaths in the same XML string are
NOT equal
|
void |
assertXpathValuesNotEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the evaluation of two Xpaths in the same XML string are
NOT equal
|
void |
assertXpathValuesNotEqual(String controlXpath,
String inControlXMLString,
String testXpath,
String inTestXMLString)
Assert that the evaluation of two Xpaths in two XML strings are
NOT equal
|
Diff |
compareXML(Document control,
Document test)
Compare two XML documents provided as strings
|
Diff |
compareXML(InputSource control,
InputSource test)
Compare XML documents provided by two InputSource classes
|
Diff |
compareXML(Reader control,
Reader test)
Compare XML documents provided by two Reader classes
|
Diff |
compareXML(Reader control,
String test)
Compare XML documents provided by two Reader classes
|
Diff |
compareXML(String control,
Reader test)
Compare XML documents provided by two Reader classes
|
Diff |
compareXML(String control,
String test)
Compare two XML documents provided as strings
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
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, fail, fail
public XMLTestCase()
public XMLTestCase(String name)
name
- Name of testpublic Diff compareXML(InputSource control, InputSource test) throws SAXException, IOException
control
- Control documenttest
- Document to testSAXException
IOException
public Diff compareXML(Reader control, Reader test) throws SAXException, IOException
control
- Control documenttest
- Document to testSAXException
IOException
public Diff compareXML(String control, Reader test) throws SAXException, IOException
control
- Control documenttest
- Document to testSAXException
IOException
public Diff compareXML(Reader control, String test) throws SAXException, IOException
control
- Control documenttest
- Document to testSAXException
IOException
public Diff compareXML(String control, String test) throws SAXException, IOException
control
- Control documenttest
- Document to testSAXException
IOException
public Diff compareXML(Document control, Document test)
control
- Control documenttest
- Document to testpublic void assertXMLEqual(Diff diff, boolean assertion)
diff
- the result of an XML comparisonassertion
- true if asserting that result is similarpublic void assertXMLEqual(String msg, Diff diff, boolean assertion)
msg
- additional message to display if assertion failsdiff
- the result of an XML comparisonassertion
- true if asserting that result is similarpublic void assertXMLIdentical(Diff diff, boolean assertion)
diff
- the result of an XML comparisonassertion
- true if asserting that result is identicalpublic void assertXMLIdentical(String msg, Diff diff, boolean assertion)
msg
- Message to display if assertion failsdiff
- the result of an XML comparisonassertion
- true if asserting that result is identicalpublic void assertXMLEqual(InputSource control, InputSource test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLEqual(String control, String test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLEqual(Document control, Document test)
control
- XML to be compared againsttest
- XML to be testedpublic void assertXMLEqual(Reader control, Reader test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLEqual(String err, String control, String test) throws SAXException, IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLEqual(String err, InputSource control, InputSource test) throws SAXException, IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLEqual(String err, Document control, Document test)
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedpublic void assertXMLEqual(String err, Reader control, Reader test) throws SAXException, IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLNotEqual(InputSource control, InputSource test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLNotEqual(String control, String test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLNotEqual(Document control, Document test)
control
- XML to be compared againsttest
- XML to be testedpublic void assertXMLNotEqual(Reader control, Reader test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLNotEqual(String err, InputSource control, InputSource test) throws SAXException, IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLNotEqual(String err, String control, String test) throws SAXException, IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXMLNotEqual(String err, Document control, Document test)
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedpublic void assertXMLNotEqual(String err, Reader control, Reader test) throws SAXException, IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public void assertXpathsEqual(String controlXpath, String testXpath, InputSource document) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- document
- SAXException
IOException
XpathException
XpathEngine
public void assertXpathsEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
XpathEngine
public void assertXpathsEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public void assertXpathsEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, XpathException
controlXpath
- control
- testXpath
- test
- SAXException
IOException
XpathException
public void assertXpathsEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public void assertXpathsEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
XpathEngine
public void assertXpathsNotEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
XpathEngine
public void assertXpathsNotEqual(String controlXpath, String testXpath, InputSource control) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- control
- SAXException
IOException
XpathException
public void assertXpathsNotEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public void assertXpathsNotEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, XpathException
controlXpath
- control
- testXpath
- test
- SAXException
IOException
XpathException
public void assertXpathsNotEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public void assertXpathsNotEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
XpathEngine
public void assertXpathValuesEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
XpathEngine
public void assertXpathValuesEqual(String controlXpath, String testXpath, InputSource control) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- control
- SAXException
IOException
XpathException
public void assertXpathValuesEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public void assertXpathValuesEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, XpathException
controlXpath
- control
- testXpath
- test
- SAXException
IOException
XpathException
public void assertXpathValuesEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public void assertXpathValuesEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
XpathEngine
public void assertXpathValuesNotEqual(String controlXpath, String testXpath, InputSource control) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- control
- SAXException
IOException
XpathException
public void assertXpathValuesNotEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public void assertXpathValuesNotEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
public void assertXpathValuesNotEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, XpathException
controlXpath
- control
- testXpath
- test
- SAXException
IOException
XpathException
public void assertXpathValuesNotEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public void assertXpathValuesNotEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
public void assertXpathEvaluatesTo(String expectedValue, String xpathExpression, InputSource control) throws SAXException, IOException, XpathException
expectedValue
- xpathExpression
- control
- SAXException
IOException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathEvaluatesTo(String expectedValue, String xpathExpression, String inXMLString) throws SAXException, IOException, XpathException
expectedValue
- xpathExpression
- inXMLString
- SAXException
IOException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathEvaluatesTo(String expectedValue, String xpathExpression, Document inDocument) throws XpathException
expectedValue
- xpathExpression
- inDocument
- XpathException
which provides the underlying evaluation mechanism
public void assertXpathExists(String xPathExpression, InputSource xml) throws IOException, SAXException, XpathException
xPathExpression
- xml
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathExists(String xPathExpression, String inXMLString) throws IOException, SAXException, XpathException
xPathExpression
- inXMLString
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathExists(String xPathExpression, Document inDocument) throws XpathException
xPathExpression
- inDocument
- XpathException
which provides the underlying evaluation mechanism
public void assertXpathNotExists(String xPathExpression, InputSource xml) throws IOException, SAXException, XpathException
xPathExpression
- xml
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathNotExists(String xPathExpression, String inXMLString) throws IOException, SAXException, XpathException
xPathExpression
- inXMLString
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathNotExists(String xPathExpression, Document inDocument) throws XpathException
xPathExpression
- inDocument
- XpathException
which provides the underlying evaluation mechanism
public void assertXMLValid(InputSource xml) throws SAXException, ConfigurationException
xml
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(String xmlString) throws SAXException, ConfigurationException
xmlString
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(InputSource xml, String systemId) throws SAXException, ConfigurationException
xml
- systemId
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(String xmlString, String systemId) throws SAXException, ConfigurationException
xmlString
- systemId
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(InputSource xml, String systemId, String doctype) throws SAXException, ConfigurationException
xml
- systemId
- doctype
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(String xmlString, String systemId, String doctype) throws SAXException, ConfigurationException
xmlString
- systemId
- doctype
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(Validator validator)
isValid() == true
validator
- public void assertNodeTestPasses(InputSource xml, NodeTester tester, short nodeType) throws SAXException, IOException
NodeTest
for a single node type
and assert that it passesxml
- XML to be testedtester
- The test strategynodeType
- The node type to be tested: constants defined
in Node
e.g. Node.ELEMENT_NODE
SAXException
IOException
AbstractNodeTester
,
CountingNodeTester
public void assertNodeTestPasses(String xmlString, NodeTester tester, short nodeType) throws SAXException, IOException
NodeTest
for a single node type
and assert that it passesxmlString
- XML to be testedtester
- The test strategynodeType
- The node type to be tested: constants defined
in Node
e.g. Node.ELEMENT_NODE
SAXException
IOException
AbstractNodeTester
,
CountingNodeTester
public void assertNodeTestPasses(NodeTest test, NodeTester tester, short[] nodeTypes, boolean assertion)
NodeTest
for multiple node types and make an
assertion about it whether it is expected to passtest
- a NodeTest instance containing the XML source to be testedtester
- The test strategynodeTypes
- The node types to be tested: constants defined
in Node
e.g. Node.ELEMENT_NODE
assertion
- true if the test is expected to pass, false otherwiseAbstractNodeTester
,
CountingNodeTester
Copyright © 2001–2017 XMLUnit. All rights reserved.