public static void assertXmlSimilar(CharSequence expected, CharSequence actual) throws SAXException, IOException { Diff diff = new Diff(expected.toString(), actual.toString()); diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier()); assertXMLEqual(diff, true); } }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int commentDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String regex, String xpath, Document doc) throws XpathException { assertXPathMatches("expected value to match " + regex, regex, xpath, doc); }
/** * Called by NodeTest when all nodes have been iterated over: time to see * if all the nodes that were expected were found. * Note that this method also invokes {@link #resetCounter resetCounter} * so that the instance can be reused. * @exception true if expected num nodes == actual num nodes, * false otherwise */ public void noMoreNodes(NodeTest forTest) throws NodeTestException { int testedNodes = actualNumNodes; resetCounter(); if (testedNodes != expectedNumNodes) { throw new NodeTestException("Counted " + testedNodes + " node(s) but expected " + expectedNumNodes); } }
/** * Returns result of recursive comparison of all the nodes of a * control and test element. */ public boolean qualifyForComparison(Element currentControl, Element currentTest) { return compareNodes(currentControl, currentTest); }
public static void assertXPathMatches(String regex, String xpath, String xml) throws XpathException, SAXException, IOException { assertXPathMatches(EXPECTED_VALUE_TO_MATCH + regex, regex, xpath, xml); }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int cdataDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String regex, String xpath, Document doc) throws XpathException { assertXPathMatches(EXPECTED_VALUE_TO_MATCH + regex, regex, xpath, doc); }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int attributeDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String regex, String xpath, Reader reader) throws XpathException, SAXException, IOException { assertXPathMatches(EXPECTED_VALUE_TO_MATCH + regex, regex, xpath, reader); } }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int textDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String regex, String xpath, String xml) throws XpathException, SAXException, IOException { assertXPathMatches("expected value to match " + regex, regex, xpath, xml); }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int cdataDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String regex, String xpath, Reader reader) throws XpathException, SAXException, IOException { assertXPathMatches("expected value to match " + regex, regex, xpath, reader); } }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int attributeDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String message, String regex, String xpath, String xml) throws XpathException, SAXException, IOException { Document doc = XMLUnit.buildControlDocument(xml); assertXPathMatches(message, regex, xpath, doc); }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int textDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String message, String regex, String xpath, String xml) throws XpathException, SAXException, IOException { Document doc = XMLUnit.buildControlDocument(xml); assertXPathMatches(message, regex, xpath, doc); }
/** * Delegates to {@link #textualDifference textualDifference}. */ protected int commentDifference(Difference d) { return textualDifference(d); }
public static void assertXPathMatches(String message, String regex, String xpath, Reader reader) throws XpathException, SAXException, IOException { Document doc = XMLUnit.buildControlDocument(new InputSource(reader)); assertXPathMatches(message, regex, xpath, doc); }