From f2ea3e0d5bf522a5705125ee7698eb9b00f7f0b0 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 3 Jun 2018 21:19:38 +0200 Subject: [PATCH] Add XmlUnitUtils.assertXmlSimilar() --- .../org/jivesoftware/smack/test/util/XmlUnitUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/smack-core/src/test/java/org/jivesoftware/smack/test/util/XmlUnitUtils.java b/smack-core/src/test/java/org/jivesoftware/smack/test/util/XmlUnitUtils.java index 7a25fe455..dfde2efc7 100644 --- a/smack-core/src/test/java/org/jivesoftware/smack/test/util/XmlUnitUtils.java +++ b/smack-core/src/test/java/org/jivesoftware/smack/test/util/XmlUnitUtils.java @@ -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); } - }