|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.custommonkey.xmlunit.XMLTestCase
public abstract class XMLTestCase
JUnit TestCase subclass: extend this to add XML assertion facilities to your
test suites.
Available assertions are provided by static methods of the 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()
,
Examples and more at xmlunit.sourceforge.net
Field Summary |
---|
Fields inherited from interface org.custommonkey.xmlunit.XSLTConstants |
---|
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 |
Constructor Summary | |
---|---|
XMLTestCase()
Construct a new XML test case. |
|
XMLTestCase(java.lang.String name)
Construct a new test case. |
Method Summary | |
---|---|
void |
assertNodeTestPasses(org.xml.sax.InputSource xml,
NodeTester tester,
short nodeType)
Execute a NodeTest |
void |
assertNodeTestPasses(NodeTest test,
NodeTester tester,
short[] nodeTypes,
boolean assertion)
Execute a NodeTest |
void |
assertNodeTestPasses(java.lang.String xmlString,
NodeTester tester,
short nodeType)
Execute a NodeTest |
void |
assertXMLEqual(Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not similar. |
void |
assertXMLEqual(org.w3c.dom.Document control,
org.w3c.dom.Document test)
Assert that two XML documents are similar |
void |
assertXMLEqual(org.xml.sax.InputSource control,
org.xml.sax.InputSource test)
Assert that two XML documents are similar |
void |
assertXMLEqual(java.io.Reader control,
java.io.Reader test)
Assert that two XML documents are similar |
void |
assertXMLEqual(java.lang.String msg,
Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not similar. |
void |
assertXMLEqual(java.lang.String err,
org.w3c.dom.Document control,
org.w3c.dom.Document test)
Assert that two XML documents are similar |
void |
assertXMLEqual(java.lang.String err,
org.xml.sax.InputSource control,
org.xml.sax.InputSource test)
Assert that two XML documents are similar |
void |
assertXMLEqual(java.lang.String err,
java.io.Reader control,
java.io.Reader test)
Assert that two XML documents are similar |
void |
assertXMLEqual(java.lang.String control,
java.lang.String test)
Assert that two XML documents are similar |
void |
assertXMLEqual(java.lang.String err,
java.lang.String control,
java.lang.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(java.lang.String msg,
Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not identical |
void |
assertXMLNotEqual(org.w3c.dom.Document control,
org.w3c.dom.Document test)
Assert that two XML documents are NOT similar |
void |
assertXMLNotEqual(org.xml.sax.InputSource control,
org.xml.sax.InputSource test)
Assert that two XML documents are NOT similar |
void |
assertXMLNotEqual(java.io.Reader control,
java.io.Reader test)
Assert that two XML documents are NOT similar |
void |
assertXMLNotEqual(java.lang.String err,
org.w3c.dom.Document control,
org.w3c.dom.Document test)
Assert that two XML documents are NOT similar |
void |
assertXMLNotEqual(java.lang.String err,
org.xml.sax.InputSource control,
org.xml.sax.InputSource test)
Assert that two XML documents are NOT similar |
void |
assertXMLNotEqual(java.lang.String err,
java.io.Reader control,
java.io.Reader test)
Assert that two XML documents are NOT similar |
void |
assertXMLNotEqual(java.lang.String control,
java.lang.String test)
Assert that two XML documents are NOT similar |
void |
assertXMLNotEqual(java.lang.String err,
java.lang.String control,
java.lang.String test)
Assert that two XML documents are NOT similar |
void |
assertXMLValid(org.xml.sax.InputSource xml)
Assert that a piece of XML contains valid XML: the input must contain a DOCTYPE declaration to be validated |
void |
assertXMLValid(org.xml.sax.InputSource xml,
java.lang.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(org.xml.sax.InputSource xml,
java.lang.String systemId,
java.lang.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(java.lang.String xmlString)
Assert that a String containing XML contains valid XML: the String must contain a DOCTYPE declaration to be validated |
void |
assertXMLValid(java.lang.String xmlString,
java.lang.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(java.lang.String xmlString,
java.lang.String systemId,
java.lang.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(java.lang.String expectedValue,
java.lang.String xpathExpression,
org.w3c.dom.Document inDocument)
Assert the value of an Xpath expression in an DOM Document |
void |
assertXpathEvaluatesTo(java.lang.String expectedValue,
java.lang.String xpathExpression,
org.xml.sax.InputSource control)
Assert the value of an Xpath expression in an XML String |
void |
assertXpathEvaluatesTo(java.lang.String expectedValue,
java.lang.String xpathExpression,
java.lang.String inXMLString)
Assert the value of an Xpath expression in an XML String |
void |
assertXpathExists(java.lang.String xPathExpression,
org.w3c.dom.Document inDocument)
Assert that a specific XPath exists in some given XML |
void |
assertXpathExists(java.lang.String xPathExpression,
org.xml.sax.InputSource xml)
Assert that a specific XPath exists in some given XML |
void |
assertXpathExists(java.lang.String xPathExpression,
java.lang.String inXMLString)
Assert that a specific XPath exists in some given XML |
void |
assertXpathNotExists(java.lang.String xPathExpression,
org.w3c.dom.Document inDocument)
Assert that a specific XPath does NOT exist in some given XML |
void |
assertXpathNotExists(java.lang.String xPathExpression,
org.xml.sax.InputSource xml)
Assert that a specific XPath does NOT exist in some given XML |
void |
assertXpathNotExists(java.lang.String xPathExpression,
java.lang.String inXMLString)
Assert that a specific XPath does NOT exist in some given XML |
void |
assertXpathsEqual(java.lang.String controlXpath,
org.w3c.dom.Document controlDocument,
java.lang.String testXpath,
org.w3c.dom.Document testDocument)
Assert that the node lists of two Xpaths in two documents are equal |
void |
assertXpathsEqual(java.lang.String controlXpath,
org.xml.sax.InputSource control,
java.lang.String testXpath,
org.xml.sax.InputSource test)
Assert that the node lists of two Xpaths in two XML pieces are equal |
void |
assertXpathsEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.w3c.dom.Document document)
Assert that the node lists of two Xpaths in the same document are equal |
void |
assertXpathsEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.xml.sax.InputSource document)
Assert that the node lists of two Xpaths in the same document are equal |
void |
assertXpathsEqual(java.lang.String controlXpath,
java.lang.String testXpath,
java.lang.String inXMLString)
Assert that the node lists of two Xpaths in the same XML string are equal |
void |
assertXpathsEqual(java.lang.String controlXpath,
java.lang.String inControlXMLString,
java.lang.String testXpath,
java.lang.String inTestXMLString)
Assert that the node lists of two Xpaths in two XML strings are equal |
void |
assertXpathsNotEqual(java.lang.String controlXpath,
org.w3c.dom.Document controlDocument,
java.lang.String testXpath,
org.w3c.dom.Document testDocument)
Assert that the node lists of two Xpaths in two documents are NOT equal |
void |
assertXpathsNotEqual(java.lang.String controlXpath,
org.xml.sax.InputSource control,
java.lang.String testXpath,
org.xml.sax.InputSource test)
Assert that the node lists of two Xpaths in two pieces of XML are NOT equal |
void |
assertXpathsNotEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.w3c.dom.Document document)
Assert that the node lists of two Xpaths in the same document are NOT equal |
void |
assertXpathsNotEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.xml.sax.InputSource control)
Assert that the node lists of two Xpaths in the same XML are NOT equal |
void |
assertXpathsNotEqual(java.lang.String controlXpath,
java.lang.String testXpath,
java.lang.String inXMLString)
Assert that the node lists of two Xpaths in the same XML string are NOT equal |
void |
assertXpathsNotEqual(java.lang.String controlXpath,
java.lang.String inControlXMLString,
java.lang.String testXpath,
java.lang.String inTestXMLString)
Assert that the node lists of two Xpaths in two XML strings are NOT equal |
void |
assertXpathValuesEqual(java.lang.String controlXpath,
org.w3c.dom.Document controlDocument,
java.lang.String testXpath,
org.w3c.dom.Document testDocument)
Assert that the evaluation of two Xpaths in two documents are equal |
void |
assertXpathValuesEqual(java.lang.String controlXpath,
org.xml.sax.InputSource control,
java.lang.String testXpath,
org.xml.sax.InputSource test)
Assert that the evaluation of two Xpaths in two XML strings are equal |
void |
assertXpathValuesEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.w3c.dom.Document document)
Assert that the evaluation of two Xpaths in the same document are equal |
void |
assertXpathValuesEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.xml.sax.InputSource control)
Assert that the evaluation of two Xpaths in the same XML are equal |
void |
assertXpathValuesEqual(java.lang.String controlXpath,
java.lang.String testXpath,
java.lang.String inXMLString)
Assert that the evaluation of two Xpaths in the same XML string are equal |
void |
assertXpathValuesEqual(java.lang.String controlXpath,
java.lang.String inControlXMLString,
java.lang.String testXpath,
java.lang.String inTestXMLString)
Assert that the evaluation of two Xpaths in two XML strings are equal |
void |
assertXpathValuesNotEqual(java.lang.String controlXpath,
org.w3c.dom.Document controlDocument,
java.lang.String testXpath,
org.w3c.dom.Document testDocument)
Assert that the evaluation of two Xpaths in two documents are NOT equal |
void |
assertXpathValuesNotEqual(java.lang.String controlXpath,
org.xml.sax.InputSource control,
java.lang.String testXpath,
org.xml.sax.InputSource test)
Assert that the evaluation of two Xpaths in two XML strings are NOT equal |
void |
assertXpathValuesNotEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.w3c.dom.Document document)
Assert that the evaluation of two Xpaths in the same document are NOT equal |
void |
assertXpathValuesNotEqual(java.lang.String controlXpath,
java.lang.String testXpath,
org.xml.sax.InputSource control)
Assert that the evaluation of two Xpaths in the same XML string are NOT equal |
void |
assertXpathValuesNotEqual(java.lang.String controlXpath,
java.lang.String testXpath,
java.lang.String inXMLString)
Assert that the evaluation of two Xpaths in the same XML string are NOT equal |
void |
assertXpathValuesNotEqual(java.lang.String controlXpath,
java.lang.String inControlXMLString,
java.lang.String testXpath,
java.lang.String inTestXMLString)
Assert that the evaluation of two Xpaths in two XML strings are NOT equal |
Diff |
compareXML(org.w3c.dom.Document control,
org.w3c.dom.Document test)
Compare two XML documents provided as strings |
Diff |
compareXML(org.xml.sax.InputSource control,
org.xml.sax.InputSource test)
Compare XML documents provided by two InputSource classes |
Diff |
compareXML(java.io.Reader control,
java.io.Reader test)
Compare XML documents provided by two Reader classes |
Diff |
compareXML(java.io.Reader control,
java.lang.String test)
Compare XML documents provided by two Reader classes |
Diff |
compareXML(java.lang.String control,
java.io.Reader test)
Compare XML documents provided by two Reader classes |
Diff |
compareXML(java.lang.String control,
java.lang.String test)
Compare two XML documents provided as strings |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
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, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XMLTestCase()
public XMLTestCase(java.lang.String name)
name
- Name of testMethod Detail |
---|
public Diff compareXML(org.xml.sax.InputSource control, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException
control
- Control documenttest
- Document to test
org.xml.sax.SAXException
java.io.IOException
public Diff compareXML(java.io.Reader control, java.io.Reader test) throws org.xml.sax.SAXException, java.io.IOException
control
- Control documenttest
- Document to test
org.xml.sax.SAXException
java.io.IOException
public Diff compareXML(java.lang.String control, java.io.Reader test) throws org.xml.sax.SAXException, java.io.IOException
control
- Control documenttest
- Document to test
org.xml.sax.SAXException
java.io.IOException
public Diff compareXML(java.io.Reader control, java.lang.String test) throws org.xml.sax.SAXException, java.io.IOException
control
- Control documenttest
- Document to test
org.xml.sax.SAXException
java.io.IOException
public Diff compareXML(java.lang.String control, java.lang.String test) throws org.xml.sax.SAXException, java.io.IOException
control
- Control documenttest
- Document to test
org.xml.sax.SAXException
java.io.IOException
public Diff compareXML(org.w3c.dom.Document control, org.w3c.dom.Document test)
control
- Control documenttest
- Document to test
public void assertXMLEqual(Diff diff, boolean assertion)
diff
- the result of an XML comparisonassertion
- true if asserting that result is similarpublic void assertXMLEqual(java.lang.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(java.lang.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(org.xml.sax.InputSource control, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException
control
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLEqual(java.lang.String control, java.lang.String test) throws org.xml.sax.SAXException, java.io.IOException
control
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLEqual(org.w3c.dom.Document control, org.w3c.dom.Document test)
control
- XML to be compared againsttest
- XML to be testedpublic void assertXMLEqual(java.io.Reader control, java.io.Reader test) throws org.xml.sax.SAXException, java.io.IOException
control
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLEqual(java.lang.String err, java.lang.String control, java.lang.String test) throws org.xml.sax.SAXException, java.io.IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLEqual(java.lang.String err, org.xml.sax.InputSource control, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLEqual(java.lang.String err, org.w3c.dom.Document control, org.w3c.dom.Document test)
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedpublic void assertXMLEqual(java.lang.String err, java.io.Reader control, java.io.Reader test) throws org.xml.sax.SAXException, java.io.IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLNotEqual(org.xml.sax.InputSource control, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException
control
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLNotEqual(java.lang.String control, java.lang.String test) throws org.xml.sax.SAXException, java.io.IOException
control
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLNotEqual(org.w3c.dom.Document control, org.w3c.dom.Document test)
control
- XML to be compared againsttest
- XML to be testedpublic void assertXMLNotEqual(java.io.Reader control, java.io.Reader test) throws org.xml.sax.SAXException, java.io.IOException
control
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLNotEqual(java.lang.String err, org.xml.sax.InputSource control, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLNotEqual(java.lang.String err, java.lang.String control, java.lang.String test) throws org.xml.sax.SAXException, java.io.IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXMLNotEqual(java.lang.String err, org.w3c.dom.Document control, org.w3c.dom.Document test)
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be testedpublic void assertXMLNotEqual(java.lang.String err, java.io.Reader control, java.io.Reader test) throws org.xml.sax.SAXException, java.io.IOException
err
- Message to be displayed on assertion failurecontrol
- XML to be compared againsttest
- XML to be tested
org.xml.sax.SAXException
java.io.IOException
public void assertXpathsEqual(java.lang.String controlXpath, java.lang.String testXpath, org.xml.sax.InputSource document) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- document
-
org.xml.sax.SAXException
java.io.IOException
XpathException
XpathEngine
public void assertXpathsEqual(java.lang.String controlXpath, java.lang.String testXpath, org.w3c.dom.Document document) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
XpathEngine
public void assertXpathsEqual(java.lang.String controlXpath, java.lang.String testXpath, java.lang.String inXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- inXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathsEqual(java.lang.String controlXpath, org.xml.sax.InputSource control, java.lang.String testXpath, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- control
- xpathTwo
- test
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathsEqual(java.lang.String controlXpath, java.lang.String inControlXMLString, java.lang.String testXpath, java.lang.String inTestXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- inControlXMLString
- xpathTwo
- inTestXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathsEqual(java.lang.String controlXpath, org.w3c.dom.Document controlDocument, java.lang.String testXpath, org.w3c.dom.Document testDocument) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
XpathEngine
public void assertXpathsNotEqual(java.lang.String controlXpath, java.lang.String testXpath, org.w3c.dom.Document document) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
XpathEngine
public void assertXpathsNotEqual(java.lang.String controlXpath, java.lang.String testXpath, org.xml.sax.InputSource control) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- control
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathsNotEqual(java.lang.String controlXpath, java.lang.String testXpath, java.lang.String inXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- inXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathsNotEqual(java.lang.String controlXpath, org.xml.sax.InputSource control, java.lang.String testXpath, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- control
- xpathTwo
- test
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathsNotEqual(java.lang.String controlXpath, java.lang.String inControlXMLString, java.lang.String testXpath, java.lang.String inTestXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- inControlXMLString
- xpathTwo
- inTestXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathsNotEqual(java.lang.String controlXpath, org.w3c.dom.Document controlDocument, java.lang.String testXpath, org.w3c.dom.Document testDocument) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
XpathEngine
public void assertXpathValuesEqual(java.lang.String controlXpath, java.lang.String testXpath, org.w3c.dom.Document document) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
XpathEngine
public void assertXpathValuesEqual(java.lang.String controlXpath, java.lang.String testXpath, org.xml.sax.InputSource control) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- control
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesEqual(java.lang.String controlXpath, java.lang.String testXpath, java.lang.String inXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- inXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesEqual(java.lang.String controlXpath, org.xml.sax.InputSource control, java.lang.String testXpath, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- control
- xpathTwo
- test
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesEqual(java.lang.String controlXpath, java.lang.String inControlXMLString, java.lang.String testXpath, java.lang.String inTestXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- inControlXMLString
- xpathTwo
- inTestXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesEqual(java.lang.String controlXpath, org.w3c.dom.Document controlDocument, java.lang.String testXpath, org.w3c.dom.Document testDocument) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
XpathEngine
public void assertXpathValuesNotEqual(java.lang.String controlXpath, java.lang.String testXpath, org.xml.sax.InputSource control) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- control
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesNotEqual(java.lang.String controlXpath, java.lang.String testXpath, java.lang.String inXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- xpathTwo
- inXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesNotEqual(java.lang.String controlXpath, java.lang.String testXpath, org.w3c.dom.Document document) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
public void assertXpathValuesNotEqual(java.lang.String controlXpath, org.xml.sax.InputSource control, java.lang.String testXpath, org.xml.sax.InputSource test) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- control
- xpathTwo
- test
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesNotEqual(java.lang.String controlXpath, java.lang.String inControlXMLString, java.lang.String testXpath, java.lang.String inTestXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
xpathOne
- inControlXMLString
- xpathTwo
- inTestXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
public void assertXpathValuesNotEqual(java.lang.String controlXpath, org.w3c.dom.Document controlDocument, java.lang.String testXpath, org.w3c.dom.Document testDocument) throws XpathException
xpathOne
- xpathTwo
- document
-
XpathException
public void assertXpathEvaluatesTo(java.lang.String expectedValue, java.lang.String xpathExpression, org.xml.sax.InputSource control) throws org.xml.sax.SAXException, java.io.IOException, XpathException
expectedValue
- xpathExpression
- control
-
org.xml.sax.SAXException
java.io.IOException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathEvaluatesTo(java.lang.String expectedValue, java.lang.String xpathExpression, java.lang.String inXMLString) throws org.xml.sax.SAXException, java.io.IOException, XpathException
expectedValue
- xpathExpression
- inXMLString
-
org.xml.sax.SAXException
java.io.IOException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathEvaluatesTo(java.lang.String expectedValue, java.lang.String xpathExpression, org.w3c.dom.Document inDocument) throws XpathException
expectedValue
- xpathExpression
- inDocument
- ctx
-
XpathException
which provides the underlying evaluation mechanism
public void assertXpathExists(java.lang.String xPathExpression, org.xml.sax.InputSource xml) throws java.io.IOException, org.xml.sax.SAXException, XpathException
inXpathExpression
- xml
-
java.io.IOException
org.xml.sax.SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathExists(java.lang.String xPathExpression, java.lang.String inXMLString) throws java.io.IOException, org.xml.sax.SAXException, XpathException
inXpathExpression
- inXMLString
-
java.io.IOException
org.xml.sax.SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathExists(java.lang.String xPathExpression, org.w3c.dom.Document inDocument) throws XpathException
inXpathExpression
- inDocument
- ctx
-
XpathException
which provides the underlying evaluation mechanism
public void assertXpathNotExists(java.lang.String xPathExpression, org.xml.sax.InputSource xml) throws java.io.IOException, org.xml.sax.SAXException, XpathException
inXpathExpression
- xml
-
java.io.IOException
org.xml.sax.SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathNotExists(java.lang.String xPathExpression, java.lang.String inXMLString) throws java.io.IOException, org.xml.sax.SAXException, XpathException
inXpathExpression
- inXMLString
-
java.io.IOException
org.xml.sax.SAXException
XpathException
which provides the underlying evaluation mechanism
public void assertXpathNotExists(java.lang.String xPathExpression, org.w3c.dom.Document inDocument) throws XpathException
inXpathExpression
- inDocument
-
XpathException
which provides the underlying evaluation mechanism
public void assertXMLValid(org.xml.sax.InputSource xml) throws org.xml.sax.SAXException, ConfigurationException
xml
-
org.xml.sax.SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(java.lang.String xmlString) throws org.xml.sax.SAXException, ConfigurationException
xmlString
-
org.xml.sax.SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(org.xml.sax.InputSource xml, java.lang.String systemId) throws org.xml.sax.SAXException, ConfigurationException
xml
- systemId
-
org.xml.sax.SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(java.lang.String xmlString, java.lang.String systemId) throws org.xml.sax.SAXException, ConfigurationException
xmlString
- systemId
-
org.xml.sax.SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(org.xml.sax.InputSource xml, java.lang.String systemId, java.lang.String doctype) throws org.xml.sax.SAXException, ConfigurationException
xml
- systemId
- doctype
-
org.xml.sax.SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(java.lang.String xmlString, java.lang.String systemId, java.lang.String doctype) throws org.xml.sax.SAXException, ConfigurationException
xmlString
- systemId
- doctype
-
org.xml.sax.SAXException
ConfigurationException
- if validation could not be turned onValidator
public void assertXMLValid(Validator validator)
isValid() == true
validator
- public void assertNodeTestPasses(org.xml.sax.InputSource xml, NodeTester tester, short nodeType) throws org.xml.sax.SAXException, java.io.IOException
NodeTest for a single node type
and assert that it passes
- Parameters:
xml
- 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
- Throws:
org.xml.sax.SAXException
java.io.IOException
- See Also:
AbstractNodeTester
,
CountingNodeTester
public void assertNodeTestPasses(java.lang.String xmlString, NodeTester tester, short nodeType) throws org.xml.sax.SAXException, java.io.IOException
NodeTest for a single node type
and assert that it passes
- Parameters:
xmlString
- 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
- Throws:
org.xml.sax.SAXException
java.io.IOException
- See Also:
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 pass
- Parameters:
test
- 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 otherwise- See Also:
AbstractNodeTester
,
CountingNodeTester
|
XMLUnit is hosted by sourceforge.net |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |