]> source.dussan.org Git - archiva.git/commitdiff
Added the role-hint for md5 Digester to the plexus test config.
authorKenney Westerhof <kenney@apache.org>
Fri, 11 Aug 2006 02:19:29 +0000 (02:19 +0000)
committerKenney Westerhof <kenney@apache.org>
Fri, 11 Aug 2006 02:19:29 +0000 (02:19 +0000)
Re-initialize the reporter in every testcase as it isn't reset
and the internal error/succes etc. lists can contain values from
previous testcases.

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@430624 13f79535-47bb-0310-9956-ffa450edef68

maven-repository-reports-standard/src/test/java/org/apache/maven/repository/reporting/DuplicateArtifactFileReportProcessorTest.java
maven-repository-reports-standard/src/test/resources/org/apache/maven/repository/reporting/DuplicateArtifactFileReportProcessorTest.xml

index ea8d3838d9966e3bfae0a1c78576212c27f8c680..55f1aca8c284c8a486c4bbaebd8facd4d4ad1aa8 100644 (file)
@@ -33,8 +33,6 @@ import java.util.Collections;
 public class DuplicateArtifactFileReportProcessorTest
     extends AbstractRepositoryReportsTestCase
 {
-    private MockArtifactReporter reporter;
-
     private Artifact artifact;
 
     private Model model;
@@ -55,7 +53,6 @@ public class DuplicateArtifactFileReportProcessorTest
 
         artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
         artifact = createArtifact( "groupId", "artifactId", "1.0-alpha-1", "1.0-alpha-1", "jar" );
-        reporter = new MockArtifactReporter();
         model = new Model();
 
         RepositoryArtifactIndexFactory factory =
@@ -76,6 +73,8 @@ public class DuplicateArtifactFileReportProcessorTest
     {
         artifact.setFile( null );
 
+        MockArtifactReporter reporter = new MockArtifactReporter();
+
         processor.processArtifact( model, artifact, reporter, repository );
 
         assertEquals( "Check no successes", 0, reporter.getSuccesses() );
@@ -86,6 +85,8 @@ public class DuplicateArtifactFileReportProcessorTest
     public void testSuccessOnAlreadyIndexedArtifact()
         throws Exception
     {
+        MockArtifactReporter reporter = new MockArtifactReporter();
+
         processor.processArtifact( model, artifact, reporter, repository );
 
         assertEquals( "Check no successes", 1, reporter.getSuccesses() );
@@ -96,6 +97,8 @@ public class DuplicateArtifactFileReportProcessorTest
     public void testSuccessOnDifferentGroupId()
         throws Exception
     {
+        MockArtifactReporter reporter = new MockArtifactReporter();
+
         artifact.setGroupId( "different.groupId" );
         processor.processArtifact( model, artifact, reporter, repository );
 
@@ -109,6 +112,8 @@ public class DuplicateArtifactFileReportProcessorTest
     {
         Artifact newArtifact = createArtifact( "groupId", "artifactId", "1.0-alpha-1", "1.0-alpha-1", "pom" );
 
+        MockArtifactReporter reporter = new MockArtifactReporter();
+
         processor.processArtifact( model, newArtifact, reporter, repository );
 
         assertEquals( "Check no successes", 1, reporter.getSuccesses() );
@@ -123,6 +128,9 @@ public class DuplicateArtifactFileReportProcessorTest
                                              artifact.getVersion(), artifact.getType() );
         duplicate.setFile( artifact.getFile() );
 
+        MockArtifactReporter reporter = new MockArtifactReporter();
+
+        System.err.println("OKAY");
         processor.processArtifact( model, duplicate, reporter, repository );
 
         assertEquals( "Check no successes", 0, reporter.getSuccesses() );
index 7c5d6b2cd46d35025947422543d67c1bfb1b050d..d8b910c2e100bda6f4fc29e470b1213322d7da0e 100644 (file)
@@ -7,6 +7,7 @@
       <requirements>
         <requirement>
           <role>org.apache.maven.repository.digest.Digester</role>
+          <role-hint>md5</role-hint>
         </requirement>
         <requirement>
           <role>org.apache.maven.repository.indexing.RepositoryArtifactIndexFactory</role>