aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-checksum/src
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2011-06-15 11:03:10 +0000
committerMaria Odea B. Ching <oching@apache.org>2011-06-15 11:03:10 +0000
commit1af82ff7d8db47ff0dee286869d80189cabf78e4 (patch)
treee20a661bf889dca04af820b71e9908e7e2a86f02 /archiva-modules/archiva-base/archiva-checksum/src
parentdab1e929905186a20423260d0f1ce275eef4add2 (diff)
downloadarchiva-1af82ff7d8db47ff0dee286869d80189cabf78e4.tar.gz
archiva-1af82ff7d8db47ff0dee286869d80189cabf78e4.zip
use getBasedir() in FileUtil in archiva-common
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-checksum/src')
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java24
1 files changed, 3 insertions, 21 deletions
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java
index 6f75f6944..6f8d285a0 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/AbstractChecksumTestCase.java
@@ -22,6 +22,7 @@ package org.apache.archiva.checksum;
import java.io.File;
import junit.framework.TestCase;
+import org.apache.maven.archiva.common.utils.FileUtil;
/**
* AbstractChecksumTestCase
@@ -31,28 +32,9 @@ import junit.framework.TestCase;
public abstract class AbstractChecksumTestCase
extends TestCase
{
- private File basedir;
-
- public File getBasedir()
- {
- if ( basedir == null )
- {
- String sysprop = System.getProperty( "basedir" );
- if ( sysprop != null )
- {
- basedir = new File( sysprop );
- }
- else
- {
- basedir = new File( System.getProperty( "user.dir" ) );
- }
- }
- return basedir;
- }
-
public File getTestOutputDir()
{
- File dir = new File( getBasedir(), "target/test-output/" + getName() );
+ File dir = new File( FileUtil.getBasedir(), "target/test-output/" + getName() );
if ( dir.exists() == false )
{
if ( dir.mkdirs() == false )
@@ -65,7 +47,7 @@ public abstract class AbstractChecksumTestCase
public File getTestResource( String filename )
{
- File dir = new File( getBasedir(), "src/test/resources" );
+ File dir = new File( FileUtil.getBasedir(), "src/test/resources" );
File file = new File( dir, filename );
if ( file.exists() == false )
{