diff options
author | Olivier Lamy <olamy@apache.org> | 2011-05-26 20:52:33 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-05-26 20:52:33 +0000 |
commit | 2fdf7359b309daee887a89f26bd3f31970d9c504 (patch) | |
tree | 0696922987dc4b0ca52f965060c6f590685be2a6 /archiva-modules | |
parent | 1788eb54c492ac4a0f3efd6d4d504fd8fc55d26c (diff) | |
download | archiva-2fdf7359b309daee887a89f26bd3f31970d9c504.tar.gz archiva-2fdf7359b309daee887a89f26bd3f31970d9c504.zip |
fix tests in archiva-transaction
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1128076 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java index bcaed98e4..f25f0488e 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/maven/archiva/transaction/AbstractFileEventTest.java @@ -19,31 +19,44 @@ package org.apache.maven.archiva.transaction; * under the License. */ +import junit.framework.TestCase; import org.apache.commons.io.FileUtils; -import org.codehaus.plexus.spring.PlexusInSpringTestCase; -import org.codehaus.plexus.spring.PlexusToSpringUtils; import org.codehaus.plexus.digest.Digester; +import org.codehaus.plexus.digest.Md5Digester; +import org.codehaus.plexus.digest.Sha1Digester; import java.io.File; import java.io.IOException; +import java.util.Arrays; import java.util.List; /** - * * @version $Id$ */ public abstract class AbstractFileEventTest - extends PlexusInSpringTestCase + extends TestCase { protected List<Digester> digesters; - @SuppressWarnings("unchecked") + public static String getBasedir() + { + + String basedir = System.getProperty( "basedir" ); + if (basedir == null) + { + basedir = new File( "" ).getAbsolutePath(); + } + return basedir; + + } + + @SuppressWarnings( "unchecked" ) public void setUp() throws Exception { super.setUp(); - digesters = PlexusToSpringUtils.lookupList( PlexusToSpringUtils.buildSpringId( Digester.class.getName() ), getApplicationContext() ); + digesters = Arrays.asList( (Digester) new Md5Digester(), (Digester) new Sha1Digester() ); } protected void assertChecksumExists( File file, String algorithm ) |