Added 1 more unit test cases

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@354333 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Edwin L. Punzalan 2005-12-06 06:17:58 +00:00
parent 580d326d8e
commit 9d70ac69ed

View File

@ -214,6 +214,25 @@ public void testMissingMetadataPlugin()
assertEquals( "check reason", "Metadata plugin missing-plugin not found in the repository", result.getReason() );
assertFalse( "check no more failures", failures.hasNext() );
}
public void testIncompletePluginMetadata()
throws ReportProcessorException
{
ArtifactReporter reporter = new MockArtifactReporter();
RepositoryMetadata metadata = new GroupRepositoryMetadata( "groupId" );
metadata.getMetadata().addPlugin( createMetadataPlugin( "artifactId", "default" ) );
badMetadataReportProcessor.processMetadata( metadata, repository, reporter );
Iterator failures = reporter.getRepositoryMetadataFailureIterator();
assertTrue( "check there is a failure", failures.hasNext() );
RepositoryMetadataResult result = (RepositoryMetadataResult) failures.next();
// TODO: should be more robust
assertEquals( "check reason", "Plugin snapshot-artifact is present in the repository but " +
"missing in the metadata.", result.getReason() );
assertFalse( "check no more failures", failures.hasNext() );
}
public void testInvalidPluginArtifactId()
throws ReportProcessorException