From 7049d71ed85851fb5ca25b88c5e33b51cf3a5dac Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Fri, 19 Apr 2019 09:32:40 +0200 Subject: [PATCH] Port to Xmlunit 2.6.2 --- xmvn-parent/pom.xml | 10 +++++----- .../xmvn/tools/install/impl/InstallerTest.java | 6 ++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/xmvn-parent/pom.xml b/xmvn-parent/pom.xml index d4f9dda..5c21cfa 100644 --- a/xmvn-parent/pom.xml +++ b/xmvn-parent/pom.xml @@ -122,7 +122,7 @@ 3.6 3.0.1 2.19.1 - 1.6 + 2.6.2 @@ -228,8 +228,8 @@ ${junitVersion} - xmlunit - xmlunit + org.xmlunit + xmlunit-assertj ${xmlunitVersion} @@ -336,8 +336,8 @@ test - xmlunit - xmlunit + org.xmlunit + xmlunit-assertj test diff --git a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java index 9fb7d90..bece0b2 100644 --- a/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java +++ b/xmvn-tools/xmvn-install/src/test/java/org/fedoraproject/xmvn/tools/install/impl/InstallerTest.java @@ -15,8 +15,6 @@ */ package org.fedoraproject.xmvn.tools.install.impl; -import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; -import static org.custommonkey.xmlunit.XMLUnit.setIgnoreWhitespace; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.replay; import static org.easymock.EasyMock.verify; @@ -40,6 +38,7 @@ import org.junit.runner.RunWith; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; +import org.xmlunit.assertj.XmlAssert; import org.fedoraproject.xmvn.artifact.DefaultArtifact; import org.fedoraproject.xmvn.config.Artifact; @@ -188,7 +187,6 @@ public class InstallerTest protected void assertMetadataEqual( Path expected, Path actual ) throws Exception { - setIgnoreWhitespace( true ); assertTrue( Files.isRegularFile( actual ) ); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); @@ -208,7 +206,7 @@ public class InstallerTest unifyUuids( expectedXml.getElementsByTagName( "uuid" ) ); unifyUuids( actualXml.getElementsByTagName( "uuid" ) ); - assertXMLEqual( expectedXml, actualXml ); + XmlAssert.assertThat( expectedXml ).and( actualXml ).ignoreWhitespace().areSimilar(); } @Test -- 2.20.1