o remove the use of the deprecated basedir field in PlexusTestCase and use

the getBasedir() method.

o use the getBasedir() method in any test helpers that construct paths.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163201 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2004-10-23 13:33:59 +00:00
parent a595eacd35
commit 0c72d1fb06
3 changed files with 15 additions and 6 deletions

View File

@ -54,10 +54,11 @@ public abstract class ArtifactComponentTestCase
String path = "target/test-classes/repositories/" + component() + "/bad-local-repository";
File f = new File( path );
File f = new File( getBasedir(), path );
f.createNewFile();
localRepository.setUrl( "file://" + path );
localRepository.setUrl( "file://" + f.getPath() );
return localRepository;
}
@ -66,7 +67,11 @@ public abstract class ArtifactComponentTestCase
{
ArtifactRepository localRepository = new ArtifactRepository();
localRepository.setUrl( "file://" + "target/test-classes/repositories/" + component() + "/local-repository" );
String path = "target/test-classes/repositories/" + component() + "/local-repository";
File f = new File( getBasedir(), path );
localRepository.setUrl( "file://" + f.getPath() );
return localRepository;
}
@ -75,7 +80,11 @@ public abstract class ArtifactComponentTestCase
{
ArtifactRepository repository = new ArtifactRepository();
repository.setUrl( "file://" + "target/test-classes/repositories/" + component() + "/remote-repository" );
String path = "target/test-classes/repositories/" + component() + "/remote-repository";
File f = new File( getBasedir(), path );
repository.setUrl( "file://" + f.getPath() );
return repository;
}

View File

@ -46,7 +46,7 @@ public class ArtifactDeployerTest
public void testArtifactInstallation()
throws Exception
{
String artifactBasedir = new File( basedir, "src/test/resources/artifact-install" ).getAbsolutePath();
String artifactBasedir = new File( getBasedir(), "src/test/resources/artifact-install" ).getAbsolutePath();
Artifact artifact = createArtifact( "artifact", "1.0" );

View File

@ -47,7 +47,7 @@ public class ArtifactInstallerTest
public void testArtifactInstallation()
throws Exception
{
String artifactBasedir = new File( basedir, "src/test/resources/artifact-install" ).getAbsolutePath();
String artifactBasedir = new File( getBasedir(), "src/test/resources/artifact-install" ).getAbsolutePath();
Artifact artifact = createArtifact( "artifact", "1.0" );