@Test public void elementsWithDifferentPrefixesAreSimilar() { Diff diff = DiffBuilder.compare("<Root xmlns:x='http: .withTest("<Root xmlns:y='http: .build(); assertEquals(1, Linqy.count(diff.getDifferences())); assertEquals(ComparisonResult.SIMILAR, diff.getDifferences().iterator().next().getResult()); assertEquals(ComparisonType.NAMESPACE_PREFIX, diff.getDifferences().iterator().next().getComparison().getType()); }
@Override public void compare(Source control, Source test) { if (control == null) { throw new IllegalArgumentException("control must not be null"); } if (test == null) { throw new IllegalArgumentException("test must not be null"); } try { Node controlNode = Convert.toNode(control, documentBuilderFactory); Node testNode = Convert.toNode(test, documentBuilderFactory); compareNodes(controlNode, xpathContextFor(controlNode), testNode, xpathContextFor(testNode)); } catch (Exception ex) { throw new XMLUnitException("Caught exception during comparison", ex); } }
DOMDifferenceEngine extends AbstractDifferenceEngine { @Override public void compare(Source control, Source test) { if (control == null) { throw new IllegalArgumentException("control must not be null"); } if (test == null) { throw new IllegalArgumentException("test must not be null"); } try { Node controlNode = Convert.toNode(control, documentBuilderFactory); Node testNode = Convert.toNode(test, documentBuilderFactory); compareNodes(controlNode, xpathContextFor(controlNode), testNode, xpathContextFor(testNode)); } catch (Exception ex) { throw new XMLUnitException("Caught exception during comparison", ex); } } }
DOMDifferenceEngine extends AbstractDifferenceEngine { @Override public void compare(Source control, Source test) { if (control == null) { throw new IllegalArgumentException("control must not be null"); } if (test == null) { throw new IllegalArgumentException("test must not be null"); } try { Node controlNode = Convert.toNode(control, documentBuilderFactory); Node testNode = Convert.toNode(test, documentBuilderFactory); compareNodes(controlNode, xpathContextFor(controlNode), testNode, xpathContextFor(testNode)); } catch (Exception ex) { throw new XMLUnitException("Caught exception during comparison", ex); } } DOMDifferenceEngine();  DOMDifferenceEngine(final DocumentBuilderFactory f); }
DOMDifferenceEngine extends AbstractDifferenceEngine { @Override public void compare(Source control, Source test) { if (control == null) { throw new IllegalArgumentException("control must not be null"); } if (test == null) { throw new IllegalArgumentException("test must not be null"); } try { Node controlNode = Convert.toNode(control, documentBuilderFactory); Node testNode = Convert.toNode(test, documentBuilderFactory); compareNodes(controlNode, xpathContextFor(controlNode), testNode, xpathContextFor(testNode)); } catch (Exception ex) { throw new XMLUnitException("Caught exception during comparison", ex); } } DOMDifferenceEngine();  DOMDifferenceEngine(final DocumentBuilderFactory f); void setDocumentBuilderFactory(DocumentBuilderFactory f); @Override void compare(Source control, Source test); }
DOMDifferenceEngine extends AbstractDifferenceEngine { @Override public void compare(Source control, Source test) { if (control == null) { throw new IllegalArgumentException("control must not be null"); } if (test == null) { throw new IllegalArgumentException("test must not be null"); } try { Node controlNode = Convert.toNode(control, documentBuilderFactory); Node testNode = Convert.toNode(test, documentBuilderFactory); compareNodes(controlNode, xpathContextFor(controlNode), testNode, xpathContextFor(testNode)); } catch (Exception ex) { throw new XMLUnitException("Caught exception during comparison", ex); } } DOMDifferenceEngine();  DOMDifferenceEngine(final DocumentBuilderFactory f); void setDocumentBuilderFactory(DocumentBuilderFactory f); @Override void compare(Source control, Source test);  }