public class DuplicateArtifactFileReportProcessorTest
extends AbstractRepositoryReportsTestCase
{
- private MockArtifactReporter reporter;
-
private Artifact artifact;
private Model model;
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 =
{
artifact.setFile( null );
+ MockArtifactReporter reporter = new MockArtifactReporter();
+
processor.processArtifact( model, artifact, reporter, repository );
assertEquals( "Check no successes", 0, reporter.getSuccesses() );
public void testSuccessOnAlreadyIndexedArtifact()
throws Exception
{
+ MockArtifactReporter reporter = new MockArtifactReporter();
+
processor.processArtifact( model, artifact, reporter, repository );
assertEquals( "Check no successes", 1, reporter.getSuccesses() );
public void testSuccessOnDifferentGroupId()
throws Exception
{
+ MockArtifactReporter reporter = new MockArtifactReporter();
+
artifact.setGroupId( "different.groupId" );
processor.processArtifact( model, artifact, reporter, repository );
{
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() );
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() );