FileUtilsTestCase: test directory is delete in tear down method, so remove clean up in individual tests
MODIFY
src/test/java/org/apache/commons/io/FileUtilsTestCase.java
src/test/java/org/apache/commons/io/FileUtilsTestCase.java
@@ -763,7 +763,6 @@ public void testForceMkdirParent() throws Exception {
// Tests with existing directory
assertTrue(getTestDirectory().exists());
final File testParentDir = new File(getTestDirectory(), "testForceMkdirParent");
- try {
testParentDir.delete();
assertFalse(testParentDir.exists());
final File testFile = new File(testParentDir, "test.txt");
@@ -777,9 +776,6 @@ public void testForceMkdirParent() throws Exception {
FileUtils.forceMkdirParent(testFile);
assertTrue(testParentDir.exists());
assertFalse(testFile.exists());
- } finally {
- testParentDir.delete();
- }
}
// sizeOfDirectory
@@ -797,7 +793,6 @@ public void testSizeOfDirectory() throws Exception {
// Creates file
file.createNewFile();
- file.deleteOnExit();
// Existing file
try {
@@ -2512,7 +2507,6 @@ public boolean renameTo(final File f) {
assertTrue("Original deleted", !src.exists());
}
-
@Test
public void testMoveFile_CopyDelete_Failed() throws Exception {
final File destination = new File(getTestDirectory(), "move3.txt");
@@ -2599,7 +2593,6 @@ public void testMoveFile_Errors() throws Exception {
} catch (final FileExistsException e) {
// expected
}
-
}
@Test
@@ -2792,7 +2785,6 @@ public void testMoveDirectory_Errors() throws Exception {
} catch (final FileExistsException e) {
// expected
}
-
}
@Test

FileUtilsTestCase: test directory is delete in tear down method, so remove clean up in individual tests