fix tests in archiva-transaction

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1128076 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-05-26 20:52:33 +00:00
parent 1788eb54c4
commit 2fdf7359b3
2 changed files with 20 additions and 7 deletions

View File

@ -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 )

View File

@ -572,7 +572,7 @@
<dependency>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-plexus</artifactId>
<version>2.2.0</version>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.sonatype.sisu</groupId>