archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1357562 - in /archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum: ChecksumTest.java ChecksummedFileTest.java
Date Thu, 05 Jul 2012 11:44:32 GMT
Author: olamy
Date: Thu Jul  5 11:44:32 2012
New Revision: 1357562

URL: http://svn.apache.org/viewvc?rev=1357562&view=rev
Log:
[MRM-1638] Improve unit test for archiva build

Modified:
    archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
    archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java?rev=1357562&r1=1357561&r2=1357562&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksumTest.java
Thu Jul  5 11:44:32 2012
@@ -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";
 

Modified: archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java?rev=1357562&r1=1357561&r2=1357562&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-checksum/src/test/java/org/apache/archiva/checksum/ChecksummedFileTest.java
Thu Jul  5 11:44:32 2012
@@ -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 
     {



Mime
View raw message