1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Add XmlUnitUtils.assertXmlSimilar()

This commit is contained in:
Florian Schmaus 2018-06-03 21:19:38 +02:00
parent 8aa7029b38
commit f2ea3e0d5b

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2014 Florian Schmaus
* Copyright 2014-2018 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,10 +26,14 @@ import org.xml.sax.SAXException;
public class XmlUnitUtils {
// TOOD: Remove this method.
public static void assertSimilar(CharSequence expected, CharSequence actual) throws SAXException, IOException {
assertXmlSimilar(expected, actual);
}
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);
}
}