public class XMLAssert extends junit.framework.Assert implements XSLTConstants
assertXMLEqual
assertXMLNotEqual
assertXMLIdentical
assertXMLEqual
is sufficientassertXpathExists
assertXpathNotExists
assertXpathsEqual
assertXpathsNotEqual
assertXpathValuesEqual
assertXpathValuesNotEqual
assertXpathEvaluatesTo
assertXMLValid
assertNodeTestPasses
NodeTest
Diff
instances which can be instantiated and evaluated
independently of this class.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
Modifier | Constructor and Description |
---|---|
protected |
XMLAssert() |
Modifier and Type | Method and Description |
---|---|
static void |
assertNodeTestPasses(InputSource xml,
NodeTester tester,
short nodeType)
Execute a
NodeTest for a single node type
and assert that it passes |
static 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 |
static void |
assertNodeTestPasses(String xmlString,
NodeTester tester,
short nodeType)
Execute a
NodeTest for a single node type
and assert that it passes |
static void |
assertXMLEqual(Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not similar.
|
static void |
assertXMLEqual(Document control,
Document test)
Assert that two XML documents are similar
|
static void |
assertXMLEqual(InputSource control,
InputSource test)
Assert that two XML documents are similar
|
static void |
assertXMLEqual(Reader control,
Reader test)
Assert that two XML documents are similar
|
static void |
assertXMLEqual(String msg,
Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not similar.
|
static void |
assertXMLEqual(String err,
Document control,
Document test)
Assert that two XML documents are similar
|
static void |
assertXMLEqual(String err,
InputSource control,
InputSource test)
Assert that two XML documents are similar
|
static void |
assertXMLEqual(String err,
Reader control,
Reader test)
Assert that two XML documents are similar
|
static void |
assertXMLEqual(String control,
String test)
Assert that two XML documents are similar
|
static void |
assertXMLEqual(String err,
String control,
String test)
Assert that two XML documents are similar
|
static void |
assertXMLIdentical(Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not identical
|
static void |
assertXMLIdentical(String msg,
Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not identical
|
static void |
assertXMLNotEqual(Document control,
Document test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLNotEqual(InputSource control,
InputSource test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLNotEqual(Reader control,
Reader test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLNotEqual(String err,
Document control,
Document test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLNotEqual(String err,
InputSource control,
InputSource test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLNotEqual(String err,
Reader control,
Reader test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLNotEqual(String control,
String test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLNotEqual(String err,
String control,
String test)
Assert that two XML documents are NOT similar
|
static void |
assertXMLValid(InputSource xml)
Assert that an InputSource containing XML contains valid XML:
the document must contain a DOCTYPE declaration to be validated
|
static void |
assertXMLValid(InputSource xml,
String systemId)
Assert that an InputSource containing XML contains valid XML:
the document must contain a DOCTYPE to be validated, but the
validation will use the systemId to obtain the DTD
|
static 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.
|
static void |
assertXMLValid(String xmlString)
Assert that a String containing XML contains valid XML: the String must
contain a DOCTYPE declaration to be validated
|
static 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
|
static 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.
|
static void |
assertXMLValid(Validator validator)
Assert that a Validator instance returns
isValid() == true |
static void |
assertXpathEvaluatesTo(QualifiedName expectedValue,
String xpathExpression,
Document inDocument)
Assert the value of an Xpath expression in an DOM Document
|
static void |
assertXpathEvaluatesTo(QualifiedName expectedValue,
String xpathExpression,
InputSource control)
Assert the value of an Xpath expression in an XML document.
|
static void |
assertXpathEvaluatesTo(QualifiedName expectedValue,
String xpathExpression,
String inXMLString)
Assert the value of an Xpath expression in an XML String
|
static void |
assertXpathEvaluatesTo(String expectedValue,
String xpathExpression,
Document inDocument)
Assert the value of an Xpath expression in an DOM Document
|
static void |
assertXpathEvaluatesTo(String expectedValue,
String xpathExpression,
InputSource control)
Assert the value of an Xpath expression in an XML document.
|
static void |
assertXpathEvaluatesTo(String expectedValue,
String xpathExpression,
String inXMLString)
Assert the value of an Xpath expression in an XML String
|
static void |
assertXpathExists(String xPathExpression,
Document inDocument)
Assert that a specific XPath exists in some given XML
|
static void |
assertXpathExists(String xPathExpression,
InputSource control)
Assert that a specific XPath exists in some given XML
|
static void |
assertXpathExists(String xPathExpression,
String inXMLString)
Assert that a specific XPath exists in some given XML
|
static void |
assertXpathNotExists(String xPathExpression,
Document inDocument)
Assert that a specific XPath does NOT exist in some given XML
|
static void |
assertXpathNotExists(String xPathExpression,
InputSource control)
Assert that a specific XPath does NOT exist in some given XML
|
static void |
assertXpathNotExists(String xPathExpression,
String inXMLString)
Assert that a specific XPath does NOT exist in some given XML
|
static void |
assertXpathsEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the node lists of two Xpaths in two documents are equal
|
static void |
assertXpathsEqual(String controlXpath,
InputSource controlDocument,
String testXpath,
InputSource testDocument)
Assert that the node lists of two Xpaths in two documents are equal
|
static void |
assertXpathsEqual(String controlXpath,
String testXpath,
Document document)
Assert that the node lists of two Xpaths in the same document are equal
|
static void |
assertXpathsEqual(String controlXpath,
String testXpath,
InputSource document)
Assert that the node lists of two Xpaths in the same document are equal
|
static void |
assertXpathsEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the node lists of two Xpaths in the same XML string are
equal
|
static void |
assertXpathsEqual(String controlXpath,
String inControlXMLString,
String testXpath,
String inTestXMLString)
Assert that the node lists of two Xpaths in two XML strings are equal
|
static void |
assertXpathsNotEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the node lists of two Xpaths in two documents are NOT equal
|
static void |
assertXpathsNotEqual(String controlXpath,
InputSource controlDocument,
String testXpath,
InputSource testDocument)
Assert that the node lists of two Xpaths in two XML strings are
NOT equal
|
static void |
assertXpathsNotEqual(String controlXpath,
String testXpath,
Document document)
Assert that the node lists of two Xpaths in the same document are NOT equal
|
static void |
assertXpathsNotEqual(String controlXpath,
String testXpath,
InputSource document)
Assert that the node lists of two Xpaths in the same document are NOT equal
|
static void |
assertXpathsNotEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the node lists of two Xpaths in the same XML string are NOT
equal
|
static 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
|
static void |
assertXpathValuesEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the evaluation of two Xpaths in two documents are equal
|
static void |
assertXpathValuesEqual(String controlXpath,
InputSource control,
String testXpath,
InputSource test)
Assert that the evaluation of two Xpaths in two XML strings are equal
|
static void |
assertXpathValuesEqual(String controlXpath,
String testXpath,
Document document)
Assert that the evaluation of two Xpaths in the same document are equal
|
static void |
assertXpathValuesEqual(String controlXpath,
String testXpath,
InputSource document)
Assert that the evaluation of two Xpaths in the same XML string are
equal
|
static void |
assertXpathValuesEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the evaluation of two Xpaths in the same XML string are
equal
|
static void |
assertXpathValuesEqual(String controlXpath,
String inControlXMLString,
String testXpath,
String inTestXMLString)
Assert that the evaluation of two Xpaths in two XML strings are equal
|
static void |
assertXpathValuesNotEqual(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument)
Assert that the evaluation of two Xpaths in two documents are
NOT equal
|
static void |
assertXpathValuesNotEqual(String controlXpath,
InputSource control,
String testXpath,
InputSource test)
Assert that the evaluation of two Xpaths in two XML strings are
NOT equal
|
static void |
assertXpathValuesNotEqual(String controlXpath,
String testXpath,
Document document)
Assert that the evaluation of two Xpaths in the same document are
NOT equal
|
static void |
assertXpathValuesNotEqual(String controlXpath,
String testXpath,
InputSource control)
Assert that the evaluation of two Xpaths in the same XML string are
NOT equal
|
static void |
assertXpathValuesNotEqual(String controlXpath,
String testXpath,
String inXMLString)
Assert that the evaluation of two Xpaths in the same XML string are
NOT equal
|
static void |
assertXpathValuesNotEqual(String controlXpath,
String inControlXMLString,
String testXpath,
String inTestXMLString)
Assert that the evaluation of two Xpaths in two XML strings are
NOT equal
|
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 static void assertXMLEqual(Diff diff, boolean assertion)
diff
- the result of an XML comparisonassertion
- true if asserting that result is similarpublic static 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 static void assertXMLIdentical(Diff diff, boolean assertion)
diff
- the result of an XML comparisonassertion
- true if asserting that result is identicalpublic static 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 static void assertXMLEqual(InputSource control, InputSource test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public static void assertXMLEqual(String control, String test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public static void assertXMLEqual(Document control, Document test)
control
- XML to be compared againsttest
- XML to be testedpublic static void assertXMLEqual(Reader control, Reader test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public static 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 static 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 static 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 static 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 static void assertXMLNotEqual(InputSource control, InputSource test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public static void assertXMLNotEqual(String control, String test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public static void assertXMLNotEqual(Document control, Document test)
control
- XML to be compared againsttest
- XML to be testedpublic static void assertXMLNotEqual(Reader control, Reader test) throws SAXException, IOException
control
- XML to be compared againsttest
- XML to be testedSAXException
IOException
public static 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 static 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 static 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 static 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 static void assertXpathsEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
XpathEngine
public static void assertXpathsEqual(String controlXpath, String testXpath, InputSource document) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- document
- SAXException
IOException
XpathException
XpathEngine
public static void assertXpathsEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public static void assertXpathsEqual(String controlXpath, InputSource controlDocument, String testXpath, InputSource testDocument) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- SAXException
IOException
XpathException
XpathEngine
public static void assertXpathsEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public static void assertXpathsEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
XpathEngine
public static void assertXpathsNotEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
XpathEngine
public static void assertXpathsNotEqual(String controlXpath, String testXpath, InputSource document) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- document
- SAXException
IOException
XpathException
XpathEngine
public static void assertXpathsNotEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public static void assertXpathsNotEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public static void assertXpathsNotEqual(String controlXpath, InputSource controlDocument, String testXpath, InputSource testDocument) throws SAXException, IOException, XpathException
controlXpath
- controlDocument
- testXpath
- testDocument
- SAXException
IOException
XpathException
public static void assertXpathsNotEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
XpathEngine
public static void assertXpathValuesEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
XpathEngine
public static void assertXpathValuesEqual(String controlXpath, String testXpath, InputSource document) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- document
- SAXException
IOException
XpathException
public static void assertXpathValuesEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public static void assertXpathValuesEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, XpathException
controlXpath
- control
- testXpath
- test
- SAXException
IOException
XpathException
public static void assertXpathValuesEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public static void assertXpathValuesEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
XpathEngine
public static void assertXpathValuesNotEqual(String controlXpath, String testXpath, InputSource control) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- control
- SAXException
IOException
XpathException
public static void assertXpathValuesNotEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException
controlXpath
- testXpath
- inXMLString
- SAXException
IOException
XpathException
public static void assertXpathValuesNotEqual(String controlXpath, String testXpath, Document document) throws XpathException
controlXpath
- testXpath
- document
- XpathException
public static void assertXpathValuesNotEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, XpathException
controlXpath
- control
- testXpath
- test
- SAXException
IOException
XpathException
public static void assertXpathValuesNotEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, XpathException
controlXpath
- inControlXMLString
- testXpath
- inTestXMLString
- SAXException
IOException
XpathException
public static void assertXpathValuesNotEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws XpathException
controlXpath
- testXpath
- controlDocument
- testDocument
- XpathException
public static 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 static 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 static void assertXpathEvaluatesTo(String expectedValue, String xpathExpression, Document inDocument) throws XpathException
expectedValue
- xpathExpression
- inDocument
- XpathException
which provides the underlying evaluation mechanism
public static void assertXpathEvaluatesTo(QualifiedName expectedValue, String xpathExpression, InputSource control) throws SAXException, IOException, XpathException
expectedValue
- xpathExpression
- control
- SAXException
IOException
XpathException
which provides the underlying evaluation mechanism
public static void assertXpathEvaluatesTo(QualifiedName expectedValue, String xpathExpression, String inXMLString) throws SAXException, IOException, XpathException
expectedValue
- xpathExpression
- inXMLString
- SAXException
IOException
XpathException
which provides the underlying evaluation mechanism
public static void assertXpathEvaluatesTo(QualifiedName expectedValue, String xpathExpression, Document inDocument) throws XpathException
expectedValue
- xpathExpression
- inDocument
- XpathException
which provides the underlying evaluation mechanism
public static void assertXpathExists(String xPathExpression, InputSource control) throws IOException, SAXException, XpathException
xPathExpression
- control
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public static void assertXpathExists(String xPathExpression, String inXMLString) throws IOException, SAXException, XpathException
xPathExpression
- inXMLString
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public static void assertXpathExists(String xPathExpression, Document inDocument) throws XpathException
xPathExpression
- inDocument
- XpathException
which provides the underlying evaluation mechanism
public static void assertXpathNotExists(String xPathExpression, InputSource control) throws IOException, SAXException, XpathException
xPathExpression
- control
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public static void assertXpathNotExists(String xPathExpression, String inXMLString) throws IOException, SAXException, XpathException
xPathExpression
- inXMLString
- IOException
SAXException
XpathException
which provides the underlying evaluation mechanism
public static void assertXpathNotExists(String xPathExpression, Document inDocument) throws XpathException
xPathExpression
- inDocument
- XpathException
which provides the underlying evaluation mechanism
public static void assertXMLValid(InputSource xml) throws SAXException, ConfigurationException
xml
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public static void assertXMLValid(String xmlString) throws SAXException, ConfigurationException
xmlString
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public static void assertXMLValid(InputSource xml, String systemId) throws SAXException, ConfigurationException
xml
- systemId
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public static void assertXMLValid(String xmlString, String systemId) throws SAXException, ConfigurationException
xmlString
- systemId
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public static void assertXMLValid(InputSource xml, String systemId, String doctype) throws SAXException, ConfigurationException
xml
- systemId
- doctype
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public static void assertXMLValid(String xmlString, String systemId, String doctype) throws SAXException, ConfigurationException
xmlString
- systemId
- doctype
- SAXException
ConfigurationException
- if validation could not be turned onValidator
public static void assertXMLValid(Validator validator)
isValid() == true
validator
- public static 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 org.w3c.dom.Node
e.g. Node.ELEMENT_NODE
SAXException
IOException
AbstractNodeTester
,
CountingNodeTester
public static 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 org.w3c.dom.Node
e.g. Node.ELEMENT_NODE
SAXException
IOException
AbstractNodeTester
,
CountingNodeTester
public static 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 org.w3c.dom.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.