aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-checksum/src
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-07-05 11:44:32 +0000
committerOlivier Lamy <olamy@apache.org>2012-07-05 11:44:32 +0000
commit2decc24d0e61c89406db32c922f6afac22c07a1e (patch)
tree4e4894af5a2311f644273fa5b884f266fc6b9d27 /archiva-modules/archiva-base/archiva-checksum/src
parentdd386202d686e721823cc3aaa481bedc2b6ed818 (diff)
downloadarchiva-2decc24d0e61c89406db32c922f6afac22c07a1e.tar.gz
archiva-2decc24d0e61c89406db32c922f6afac22c07a1e.zip
[MRM-1638] Improve unit test for archiva build
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1357562 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/ChecksumTest.java6
-rw-r--r--archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java15
2 files changed, 20 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
index 40f95a56b..f763cd952 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
@@ -23,15 +23,19 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import junit.framework.TestCase;
+import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
import org.junit.Test;
+import org.junit.runner.RunWith;
/**
* ChecksumTest
*
* @version $Id$
*/
+@RunWith( ArchivaBlockJUnit4ClassRunner.class )
public class ChecksumTest
- extends AbstractChecksumTestCase
+ extends TestCase
{
private static final String UNSET_SHA1 = "da39a3ee5e6b4b0d3255bfef95601890afd80709";
diff --git a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java
index e4122d93a..d452e1239 100644
--- a/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java
+++ b/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java
@@ -21,9 +21,12 @@ package org.apache.archiva.checksum;
import java.io.File;
import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
+import org.junit.Before;
import org.junit.Test;
/**
@@ -42,6 +45,18 @@ public class ChecksummedFileTest
private static final String REMOTE_METADATA_MD5 = "d41d8cd98f00b204e9800998ecf8427e";
+
+ @Before
+ public void cleanTestDir()
+ {
+ try
+ {
+ FileUtils.deleteDirectory(getTestOutputDir());
+ } catch (IOException ex) {
+ Logger.getLogger(ChecksummedFileTest.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ }
+
private File createTestableJar( String filename )
throws IOException
{