From 3c9bf157818feffc36133df5e89e415d8a711668 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Thu, 26 Apr 2007 17:45:45 +0000 Subject: [PATCH] Adding xmlunit to unit testing of metadata modules. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches@532822 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-base/archiva-repository-layer/pom.xml | 7 +++++++ .../repository/metadata/RepositoryMetadataWriterTest.java | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml b/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml index 4efe5bd4e..e1611a83d 100644 --- a/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml +++ b/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/pom.xml @@ -78,6 +78,13 @@ org.slf4j slf4j-log4j12 + test + + + xmlunit + xmlunit + 1.0 + test org.codehaus.plexus.registry diff --git a/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataWriterTest.java b/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataWriterTest.java index fc0653ca4..9fb8000ad 100644 --- a/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataWriterTest.java +++ b/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/metadata/RepositoryMetadataWriterTest.java @@ -22,6 +22,7 @@ package org.apache.maven.archiva.repository.metadata; import org.apache.commons.io.FileUtils; import org.apache.maven.archiva.model.ArchivaRepositoryMetadata; import org.codehaus.plexus.PlexusTestCase; +import org.custommonkey.xmlunit.XMLAssert; import java.io.File; import java.io.StringWriter; @@ -55,6 +56,6 @@ public class RepositoryMetadataWriterTest StringWriter actual = new StringWriter(); RepositoryMetadataWriter.write( metadata, actual ); - assertEquals( "XML Contents", expectedContent, actual.toString() ); + XMLAssert.assertXMLEqual( "XML Contents", expectedContent, actual.toString() ); } } -- 2.39.5