public class XMLAssertTestNG extends Object implements org.custommonkey.xmlunit.XSLTConstants
This class is functionally identical to, and copied from, XMLAssert. Rather than
inheriting from and using JUnit's Assert class, it instead uses TestNG's Assert.
assertXMLEqualassertXMLNotEqualassertXMLIdenticalassertXMLEqual is sufficientassertXpathExistsassertXpathNotExistsassertXpathsEqualassertXpathsNotEqualassertXpathValuesEqualassertXpathValuesNotEqualassertXpathEvaluatesToassertXMLValidassertNodeTestPassesNodeTestDiff instances which can be instantiated
and evaluated independently of this class.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_NOINDENTCLOSE_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 |
XMLAssertTestNG() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertNodeTestPasses(InputSource xml,
org.custommonkey.xmlunit.NodeTester tester,
short nodeType)
Execute a
NodeTest |
static void |
assertNodeTestPasses(org.custommonkey.xmlunit.NodeTest test,
org.custommonkey.xmlunit.NodeTester tester,
short[] nodeTypes,
boolean assertion)
Execute a
NodeTest |
static void |
assertNodeTestPasses(String xmlString,
org.custommonkey.xmlunit.NodeTester tester,
short nodeType)
Execute a
NodeTest |
static void |
assertXMLEqual(org.custommonkey.xmlunit.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,
org.custommonkey.xmlunit.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(org.custommonkey.xmlunit.Diff diff,
boolean assertion)
Assert that the result of an XML comparison is or is not identical
|
static void |
assertXMLIdentical(String msg,
org.custommonkey.xmlunit.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(org.custommonkey.xmlunit.Validator validator)
Assert that a Validator instance returns
isValid() == true |
private static void |
assertXpathEquality(String controlXpath,
Document controlDocument,
String testXpath,
Document testDocument,
boolean equal)
Assert that the node lists of two Xpaths in two documents are equal or not.
|
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
|
private static Document |
asXpathResultDocument(DocumentBuilder builder,
NodeList nodes) |
private static String |
getFailMessage(String msg,
org.custommonkey.xmlunit.Diff diff) |
public static void assertXMLEqual(org.custommonkey.xmlunit.Diff diff,
boolean assertion)
diff - the result of an XML comparisonassertion - true if asserting that result is similarpublic static void assertXMLEqual(String msg, org.custommonkey.xmlunit.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(org.custommonkey.xmlunit.Diff diff,
boolean assertion)
diff - the result of an XML comparisonassertion - true if asserting that result is identicalpublic static void assertXMLIdentical(String msg, org.custommonkey.xmlunit.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 testedSAXExceptionIOExceptionpublic static void assertXMLEqual(String control, String test) throws SAXException, IOException
control - XML to be compared againsttest - XML to be testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic static void assertXMLNotEqual(InputSource control, InputSource test) throws SAXException, IOException
control - XML to be compared againsttest - XML to be testedSAXExceptionIOExceptionpublic static void assertXMLNotEqual(String control, String test) throws SAXException, IOException
control - XML to be compared againsttest - XML to be testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic 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 testedSAXExceptionIOExceptionpublic static void assertXpathsEqual(String controlXpath, String testXpath, Document document) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - document - org.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathsEqual(String controlXpath, String testXpath, InputSource document) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - document - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathsEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - inXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathsEqual(String controlXpath, InputSource controlDocument, String testXpath, InputSource testDocument) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - controlDocument - testXpath - testDocument - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathsEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - inControlXMLString - testXpath - inTestXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathsEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - controlDocument - testXpath - org.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathsNotEqual(String controlXpath, String testXpath, Document document) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - document - org.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathsNotEqual(String controlXpath, String testXpath, InputSource document) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - document - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathsNotEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - inXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathsNotEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - inControlXMLString - testXpath - inTestXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathsNotEqual(String controlXpath, InputSource controlDocument, String testXpath, InputSource testDocument) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - controlDocument - testXpath - testDocument - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathsNotEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - controlDocument - testXpath - testDocument - org.custommonkey.xmlunit.exceptions.XpathExceptionXpathEngineprivate static void assertXpathEquality(String controlXpath, Document controlDocument, String testXpath, Document testDocument, boolean equal) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - controlDocument - testXpath - testDocument - equal - whether the values should be equal.org.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathValuesEqual(String controlXpath, String testXpath, Document document) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - document - org.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathValuesEqual(String controlXpath, String testXpath, InputSource document) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - document - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - inXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - control - testXpath - test - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - inControlXMLString - testXpath - inTestXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - controlDocument - testXpath - testDocument - org.custommonkey.xmlunit.exceptions.XpathExceptionXpathEnginepublic static void assertXpathValuesNotEqual(String controlXpath, String testXpath, InputSource control) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - control - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesNotEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - inXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesNotEqual(String controlXpath, String testXpath, Document document) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - testXpath - document - org.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesNotEqual(String controlXpath, InputSource control, String testXpath, InputSource test) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - control - testXpath - test - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesNotEqual(String controlXpath, String inControlXMLString, String testXpath, String inTestXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - inControlXMLString - testXpath - inTestXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathValuesNotEqual(String controlXpath, Document controlDocument, String testXpath, Document testDocument) throws org.custommonkey.xmlunit.exceptions.XpathException
controlXpath - controlDocument - testXpath - testDocument - org.custommonkey.xmlunit.exceptions.XpathExceptionpublic static void assertXpathEvaluatesTo(String expectedValue, String xpathExpression, InputSource control) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
expectedValue - xpathExpression - control - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathEvaluatesTo(String expectedValue, String xpathExpression, String inXMLString) throws SAXException, IOException, org.custommonkey.xmlunit.exceptions.XpathException
expectedValue - xpathExpression - inXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathEvaluatesTo(String expectedValue, String xPathExpression, Document inDocument) throws org.custommonkey.xmlunit.exceptions.XpathException
expectedValue - xPathExpression - inDocument - org.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathExists(String xPathExpression, InputSource control) throws IOException, SAXException, org.custommonkey.xmlunit.exceptions.XpathException
xPathExpression - control - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathExists(String xPathExpression, String inXMLString) throws IOException, SAXException, org.custommonkey.xmlunit.exceptions.XpathException
xPathExpression - inXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathExists(String xPathExpression, Document inDocument) throws org.custommonkey.xmlunit.exceptions.XpathException
xPathExpression - inDocument - org.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathNotExists(String xPathExpression, InputSource control) throws IOException, SAXException, org.custommonkey.xmlunit.exceptions.XpathException
xPathExpression - control - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathNotExists(String xPathExpression, String inXMLString) throws IOException, SAXException, org.custommonkey.xmlunit.exceptions.XpathException
xPathExpression - inXMLString - SAXExceptionIOExceptionorg.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXpathNotExists(String xPathExpression, Document inDocument) throws org.custommonkey.xmlunit.exceptions.XpathException
xPathExpression - inDocument - org.custommonkey.xmlunit.exceptions.XpathExceptionwhich provides the underlying evaluation mechanismpublic static void assertXMLValid(InputSource xml) throws SAXException, org.custommonkey.xmlunit.exceptions.ConfigurationException
xml - SAXExceptionorg.custommonkey.xmlunit.exceptions.ConfigurationException - if validation could not be turned onValidatorpublic static void assertXMLValid(String xmlString) throws SAXException, org.custommonkey.xmlunit.exceptions.ConfigurationException
xmlString - SAXExceptionorg.custommonkey.xmlunit.exceptions.ConfigurationException - if validation could not be turned onValidatorpublic static void assertXMLValid(InputSource xml, String systemId) throws SAXException, org.custommonkey.xmlunit.exceptions.ConfigurationException
xml - systemId - SAXExceptionorg.custommonkey.xmlunit.exceptions.ConfigurationException - if validation could not be turned onValidatorpublic static void assertXMLValid(String xmlString, String systemId) throws SAXException, org.custommonkey.xmlunit.exceptions.ConfigurationException
xmlString - systemId - SAXExceptionorg.custommonkey.xmlunit.exceptions.ConfigurationException - if validation could not be turned onValidatorpublic static void assertXMLValid(InputSource xml, String systemId, String doctype) throws SAXException, org.custommonkey.xmlunit.exceptions.ConfigurationException
xml - systemId - doctype - SAXExceptionorg.custommonkey.xmlunit.exceptions.ConfigurationException - if validation could not be turned onValidatorpublic static void assertXMLValid(String xmlString, String systemId, String doctype) throws SAXException, org.custommonkey.xmlunit.exceptions.ConfigurationException
xmlString - systemId - doctype - SAXExceptionorg.custommonkey.xmlunit.exceptions.ConfigurationException - if validation could not be turned onValidatorpublic static void assertXMLValid(org.custommonkey.xmlunit.Validator validator)
isValid() == truevalidator - public static void assertNodeTestPasses(InputSource xml, org.custommonkey.xmlunit.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_NODESAXExceptionIOExceptionpublic static void assertNodeTestPasses(String xmlString, org.custommonkey.xmlunit.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_NODESAXExceptionIOExceptionpublic static void assertNodeTestPasses(org.custommonkey.xmlunit.NodeTest test,
org.custommonkey.xmlunit.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_NODEassertion - true if the test is expected to pass, false otherwiseprivate static Document asXpathResultDocument(DocumentBuilder builder, NodeList nodes)
Copyright © 1999–2019 Shibboleth Consortium. All rights reserved.