From cd1f4a9e79c91e11f1183045b6aeb8b93017d319 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Sat, 2 Sep 2017 22:05:16 +0200 Subject: Switching the checksum module to java.nio --- .../java/org/apache/archiva/transaction/CopyFileEventTest.java | 7 +++---- .../java/org/apache/archiva/transaction/CreateFileEventTest.java | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'archiva-modules/archiva-base/archiva-transaction/src') diff --git a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CopyFileEventTest.java b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CopyFileEventTest.java index 360f64df8..6a707ab9a 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CopyFileEventTest.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CopyFileEventTest.java @@ -20,7 +20,6 @@ package org.apache.archiva.transaction; */ import org.apache.commons.io.FileUtils; -import org.apache.archiva.common.utils.FileUtil; import java.io.File; import java.io.IOException; @@ -33,11 +32,11 @@ import org.junit.Test; public class CopyFileEventTest extends AbstractFileEventTest { - private File testDir = new File( FileUtil.getBasedir(), "target/transaction-tests/copy-file" ); + private File testDir = new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/transaction-tests/copy-file" ); private File testDest = new File( testDir, "test-file.txt" ); - private File testSource = new File( FileUtil.getBasedir(), "target/transaction-tests/test-file.txt" ); + private File testSource = new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/transaction-tests/test-file.txt" ); private File testDestChecksum; @@ -163,7 +162,7 @@ public class CopyFileEventTest { super.tearDown(); - FileUtils.deleteDirectory( new File( FileUtil.getBasedir(), "target/transaction-tests" ) ); + FileUtils.deleteDirectory( new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/transaction-tests" ) ); } @Override diff --git a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CreateFileEventTest.java b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CreateFileEventTest.java index 42b2f6245..0f8695220 100644 --- a/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CreateFileEventTest.java +++ b/archiva-modules/archiva-base/archiva-transaction/src/test/java/org/apache/archiva/transaction/CreateFileEventTest.java @@ -22,7 +22,6 @@ package org.apache.archiva.transaction; import java.io.File; import org.apache.commons.io.FileUtils; -import org.apache.archiva.common.utils.FileUtil; import org.junit.After; import org.junit.Test; @@ -31,7 +30,7 @@ import org.junit.Test; public class CreateFileEventTest extends AbstractFileEventTest { - private File testDir = new File( FileUtil.getBasedir(), "target/transaction-tests/create-file" ); + private File testDir = new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/transaction-tests/create-file" ); @Test public void testCreateCommitRollback() @@ -56,7 +55,7 @@ public class CreateFileEventTest assertChecksumRollback( testFile ); assertFalse( "Test file parent directories has been rolledback too", testDir.exists() ); - assertTrue( "target directory still exists", new File( FileUtil.getBasedir(), "target" ).exists() ); + assertTrue( "target directory still exists", new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target" ).exists() ); } @Test @@ -122,6 +121,6 @@ public class CreateFileEventTest { super.tearDown(); - FileUtils.deleteDirectory( new File( FileUtil.getBasedir(), "target/transaction-tests" ) ); + FileUtils.deleteDirectory( new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/transaction-tests" ) ); } } -- cgit v1.2.3