mirror of https://github.com/apache/maven.git
PR: MNG-787
add tests to ensure version in current POM is always used git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@291511 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
99db09fcac
commit
fba77cb146
|
@ -153,6 +153,30 @@ public class DefaultArtifactCollectorTest
|
||||||
assertEquals( "Check version", "2.0", getArtifact( "c", res.getArtifacts() ).getVersion() );
|
assertEquals( "Check version", "2.0", getArtifact( "c", res.getArtifacts() ).getVersion() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testResolveLocalNewestIsLocal()
|
||||||
|
throws ArtifactResolutionException, InvalidVersionSpecificationException
|
||||||
|
{
|
||||||
|
ArtifactSpec a = createArtifact( "a", "1.0" );
|
||||||
|
a.addDependency( "b", "2.0" );
|
||||||
|
ArtifactSpec b = createArtifact( "b", "3.0" );
|
||||||
|
|
||||||
|
ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact} ) );
|
||||||
|
assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, b.artifact} ), res.getArtifacts() );
|
||||||
|
assertEquals( "Check version", "3.0", getArtifact( "b", res.getArtifacts() ).getVersion() );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testResolveLocalOldestIsLocal()
|
||||||
|
throws ArtifactResolutionException, InvalidVersionSpecificationException
|
||||||
|
{
|
||||||
|
ArtifactSpec a = createArtifact( "a", "1.0" );
|
||||||
|
a.addDependency( "b", "3.0" );
|
||||||
|
ArtifactSpec b = createArtifact( "b", "2.0" );
|
||||||
|
|
||||||
|
ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact} ) );
|
||||||
|
assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, b.artifact} ), res.getArtifacts() );
|
||||||
|
assertEquals( "Check version", "2.0", getArtifact( "b", res.getArtifacts() ).getVersion() );
|
||||||
|
}
|
||||||
|
|
||||||
public void testResolveNearestWithRanges()
|
public void testResolveNearestWithRanges()
|
||||||
throws ArtifactResolutionException, InvalidVersionSpecificationException
|
throws ArtifactResolutionException, InvalidVersionSpecificationException
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue