mirror of https://github.com/apache/archiva.git
remove plexus test case
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@647646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d6f61ad534
commit
32b9dc0be7
|
@ -36,6 +36,17 @@
|
|||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-digest</artifactId>
|
||||
<version>1.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-container-default</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-spring</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
|
|
|
@ -20,7 +20,8 @@ package org.apache.maven.archiva.transaction;
|
|||
*/
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
import org.codehaus.plexus.spring.PlexusInSpringTestCase;
|
||||
import org.codehaus.plexus.spring.PlexusToSpringUtils;
|
||||
import org.codehaus.plexus.digest.Digester;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -33,7 +34,7 @@ import java.util.List;
|
|||
* @version $Id$
|
||||
*/
|
||||
public abstract class AbstractFileEventTest
|
||||
extends PlexusTestCase
|
||||
extends PlexusInSpringTestCase
|
||||
{
|
||||
protected List digesters;
|
||||
|
||||
|
@ -42,7 +43,7 @@ public abstract class AbstractFileEventTest
|
|||
{
|
||||
super.setUp();
|
||||
|
||||
digesters = getContainer().lookupList( Digester.class.getName() );
|
||||
digesters = PlexusToSpringUtils.lookupList( PlexusToSpringUtils.buildSpringId( Digester.class.getName() ), getApplicationContext() );
|
||||
}
|
||||
|
||||
protected void assertChecksumExists( File file, String algorithm )
|
||||
|
@ -87,4 +88,4 @@ public abstract class AbstractFileEventTest
|
|||
{
|
||||
FileUtils.writeStringToFile( file, content );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.archiva.transaction;
|
|||
*/
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -31,11 +30,11 @@ import java.io.IOException;
|
|||
public class CopyFileEventTest
|
||||
extends AbstractFileEventTest
|
||||
{
|
||||
private File testDir = new File( PlexusTestCase.getBasedir(), "target/transaction-tests/copy-file" );
|
||||
private File testDir = new File( getBasedir(), "target/transaction-tests/copy-file" );
|
||||
|
||||
private File testDest = new File( testDir, "test-file.txt" );
|
||||
|
||||
private File testSource = new File( PlexusTestCase.getBasedir(), "target/transaction-tests/test-file.txt" );
|
||||
private File testSource = new File( getBasedir(), "target/transaction-tests/test-file.txt" );
|
||||
|
||||
private File testDestChecksum;
|
||||
|
||||
|
@ -154,7 +153,7 @@ public class CopyFileEventTest
|
|||
{
|
||||
super.tearDown();
|
||||
|
||||
FileUtils.deleteDirectory( new File( PlexusTestCase.getBasedir(), "target/transaction-tests" ) );
|
||||
FileUtils.deleteDirectory( new File( getBasedir(), "target/transaction-tests" ) );
|
||||
}
|
||||
|
||||
protected void assertChecksumCommit( File file )
|
||||
|
|
|
@ -22,7 +22,6 @@ package org.apache.maven.archiva.transaction;
|
|||
import java.io.File;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.codehaus.plexus.PlexusTestCase;
|
||||
|
||||
/**
|
||||
* @author Edwin Punzalan
|
||||
|
@ -30,7 +29,7 @@ import org.codehaus.plexus.PlexusTestCase;
|
|||
public class CreateFileEventTest
|
||||
extends AbstractFileEventTest
|
||||
{
|
||||
private File testDir = new File( PlexusTestCase.getBasedir(), "target/transaction-tests/create-file" );
|
||||
private File testDir = new File( getBasedir(), "target/transaction-tests/create-file" );
|
||||
|
||||
public void testCreateCommitRollback()
|
||||
throws Exception
|
||||
|
@ -54,7 +53,7 @@ public class CreateFileEventTest
|
|||
assertChecksumRollback( testFile );
|
||||
|
||||
assertFalse( "Test file parent directories has been rolledback too", testDir.exists() );
|
||||
assertTrue( "target directory still exists", new File( PlexusTestCase.getBasedir(), "target" ).exists() );
|
||||
assertTrue( "target directory still exists", new File( getBasedir(), "target" ).exists() );
|
||||
}
|
||||
|
||||
public void testCreateCommitRollbackWithBackup()
|
||||
|
@ -116,6 +115,6 @@ public class CreateFileEventTest
|
|||
{
|
||||
super.tearDown();
|
||||
|
||||
FileUtils.deleteDirectory( new File( PlexusTestCase.getBasedir(), "target/transaction-tests" ) );
|
||||
FileUtils.deleteDirectory( new File( getBasedir(), "target/transaction-tests" ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue