test invalid snapshot version when used as a base

PR: MRM-9

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@349672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2005-11-29 08:46:45 +00:00
parent 824ecd2c84
commit 6597c5279f
2 changed files with 22 additions and 0 deletions

View File

@ -190,6 +190,28 @@ public class DefaultArtifactDiscovererTest
} }
} }
public void testKickoutWithSnapshotBaseVersion()
{
List artifacts = discoverer.discoverArtifacts( repositoryLocation, null, false );
assertNotNull( "Check artifacts not null", artifacts );
boolean found = false;
for ( Iterator i = discoverer.getKickedOutPathsIterator(); i.hasNext() && !found; )
{
String path = (String) i.next();
found = path.replace( '\\', '/' ).equals(
"invalid/invalid/1.0-20050611.123456-1/invalid-1.0-20050611.123456-1.jar" );
}
assertTrue( "Check kickout was found", found );
for ( Iterator i = artifacts.iterator(); i.hasNext(); )
{
Artifact a = (Artifact) i.next();
assertFalse( "Check not 'invalid-1.0-20050611-123456-1.jar'",
a.getFile().getName().equals( "invalid-1.0-20050611.123456-1.jar" ) );
}
}
public void testSnapshotInclusion() public void testSnapshotInclusion()
{ {
List artifacts = discoverer.discoverArtifacts( repositoryLocation, null, true ); List artifacts = discoverer.discoverArtifacts( repositoryLocation, null, true );