Repository: commons-io Updated Branches: refs/heads/master 7c6520ec7 -> 25f3713d9
Replace custom temporary folder management with JUnit's TemporaryFolder. This will allow Maven to run tests concurrently. Project: http://git-wip-us.apache.org/repos/asf/commons-io/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-io/commit/25f3713d Tree: http://git-wip-us.apache.org/repos/asf/commons-io/tree/25f3713d Diff: http://git-wip-us.apache.org/repos/asf/commons-io/diff/25f3713d Branch: refs/heads/master Commit: 25f3713d9280abd57a49a9979a23d4ebce27732f Parents: 7c6520e Author: Gary Gregory <ggreg...@apache.org> Authored: Wed Sep 27 13:11:07 2017 -0600 Committer: Gary Gregory <ggreg...@apache.org> Committed: Wed Sep 27 13:11:07 2017 -0600 ---------------------------------------------------------------------- .../io/filefilter/FileFilterTestCase.java | 46 ++++++++++++++------ 1 file changed, 33 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-io/blob/25f3713d/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java b/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java index be8b07b..063fb6e 100644 --- a/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java +++ b/src/test/java/org/apache/commons/io/filefilter/FileFilterTestCase.java @@ -16,30 +16,50 @@ */ package org.apache.commons.io.filefilter; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileFilter; +import java.io.FileOutputStream; +import java.io.FilenameFilter; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOCase; import org.apache.commons.io.IOUtils; -import org.apache.commons.io.testtools.FileBasedTestCase; import org.apache.commons.io.testtools.TestUtils; import org.junit.After; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; - -import java.io.*; -import java.nio.charset.StandardCharsets; -import java.util.*; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import org.junit.rules.TemporaryFolder; /** * Used to test FileFilterUtils. */ -public class FileFilterTestCase extends FileBasedTestCase { +public class FileFilterTestCase { + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + private File getTestDirectory() { + return temporaryFolder.getRoot(); + } /** * The subversion directory name.