aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2009-08-17 09:40:44 +0000
committerMaria Odea B. Ching <oching@apache.org>2009-08-17 09:40:44 +0000
commit4be29249796630e68b3ffc79fbc86a8476fb2ebd (patch)
tree5eefa20b2d8adc6794a1aeba9bf75436b3a66ba9 /archiva-modules
parent51ece6699a4de5905124c4d583a7a72170789eb6 (diff)
downloadarchiva-4be29249796630e68b3ffc79fbc86a8476fb2ebd.tar.gz
archiva-4be29249796630e68b3ffc79fbc86a8476fb2ebd.zip
[MRM-1194] Archiva doesn't cope with versions in a pom.xml that are properties
o updated test cases git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@804909 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolverTest.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolverTest.java b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolverTest.java
index 51048beff..db40272ca 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolverTest.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/project/resolvers/ManagedRepositoryProjectResolverTest.java
@@ -26,6 +26,7 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.model.ArchivaProjectModel;
import org.apache.maven.archiva.model.VersionedReference;
import org.apache.maven.archiva.repository.content.ManagedDefaultRepositoryContent;
+import org.apache.maven.archiva.repository.project.ProjectModelException;
import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
import org.codehaus.plexus.spring.PlexusInSpringTestCase;
@@ -68,11 +69,18 @@ public class ManagedRepositoryProjectResolverTest
assertEquals( "org.apache.archiva", model.getGroupId() );
assertEquals( "unique-version", model.getArtifactId() );
assertEquals( "1.0-SNAPSHOT", model.getVersion() );
- assertEquals( "Unique Version Snapshot - Build 3", model.getName() );
+ assertEquals( "Unique Version Snapshot - Build 3", model.getName() );
}
catch ( Exception e )
{
- fail( "The latest timestamp should have been found!" );
+ if( e instanceof ProjectModelException )
+ {
+ fail( "A ProjectModelException should not have occurred. Instead, the latest timestamp should have been found!" );
+ }
+ else
+ {
+ throw e;
+ }
}
}
@@ -119,11 +127,11 @@ public class ManagedRepositoryProjectResolverTest
try
{
resolver.resolveProjectModel( ref );
- fail( "An exception should have been thrown." );
+ fail( "A ProjectModelException should have been thrown." );
}
catch( Exception e )
{
- assertTrue( true );
+ assertTrue( e instanceof ProjectModelException );
}
}