diff options
author | Martin Stockhammer <martin_s@apache.org> | 2020-01-29 23:03:00 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2020-01-29 23:03:00 +0100 |
commit | 712867584d864d3f7c0ba66ed549342c23b958c3 (patch) | |
tree | 5adac3ab9fc78dc81deea090766f201bfd31e738 /archiva-modules/archiva-web | |
parent | 3d7c10958965f7cc5ef6b558c9e5fb0a66855a89 (diff) | |
download | archiva-712867584d864d3f7c0ba66ed549342c23b958c3.tar.gz archiva-712867584d864d3f7c0ba66ed549342c23b958c3.zip |
Switching to new xmlunit version
Diffstat (limited to 'archiva-modules/archiva-web')
4 files changed, 14 insertions, 10 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml index 7136293c4..4c9252b90 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml @@ -238,8 +238,8 @@ <scope>test</scope> </dependency> <dependency> - <groupId>xmlunit</groupId> - <artifactId>xmlunit</artifactId> + <groupId>org.xmlunit</groupId> + <artifactId>xmlunit-core</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml index 64a25140c..7d9ab0387 100644 --- a/archiva-modules/archiva-web/archiva-rss/pom.xml +++ b/archiva-modules/archiva-web/archiva-rss/pom.xml @@ -57,8 +57,8 @@ <scope>test</scope> </dependency> <dependency> - <groupId>xmlunit</groupId> - <artifactId>xmlunit</artifactId> + <groupId>org.xmlunit</groupId> + <artifactId>xmlunit-core</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml index c10f9a033..d13367243 100644 --- a/archiva-modules/archiva-web/archiva-webdav/pom.xml +++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml @@ -188,8 +188,8 @@ <scope>test</scope> </dependency> <dependency> - <groupId>xmlunit</groupId> - <artifactId>xmlunit</artifactId> + <groupId>org.xmlunit</groupId> + <artifactId>xmlunit-core</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java index 47c5d7ebf..65fc4c61a 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedMetadataTestCase.java @@ -25,9 +25,10 @@ import com.gargoylesoftware.htmlunit.WebResponse; import org.apache.archiva.common.utils.FileUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; -import org.custommonkey.xmlunit.DetailedDiff; -import org.custommonkey.xmlunit.Diff; import org.junit.Before; +import org.xmlunit.builder.DiffBuilder; +import org.xmlunit.diff.Diff; +import org.xmlunit.diff.Difference; import java.nio.file.Paths; @@ -44,9 +45,12 @@ public abstract class AbstractRepositoryServletProxiedMetadataTestCase protected void assertExpectedMetadata( String expectedMetadata, String actualMetadata ) throws Exception { - DetailedDiff detailedDiff = new DetailedDiff( new Diff( expectedMetadata, actualMetadata ) ); - if ( !detailedDiff.similar() ) + Diff detailedDiff = DiffBuilder.compare( expectedMetadata ).withTest( actualMetadata ).checkForSimilar().build(); + if ( detailedDiff.hasDifferences() ) { + for ( Difference diff : detailedDiff.getDifferences() ) { + System.out.println( diff ); + } // If it isn't similar, dump the difference. assertEquals( expectedMetadata, actualMetadata ); } |