diff options
Diffstat (limited to 'java/common/src/test')
| -rw-r--r-- | java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java b/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java index fb367d042c..76d39200c1 100644 --- a/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java +++ b/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java @@ -280,6 +280,16 @@ public class FileUtilsTest extends TestCase checkFileLists(filesBefore, filesAfter); } + public void testDeleteNonExistentFile() + { + File test = new File("FileUtilsTest-testDelete-"+System.currentTimeMillis()); + + assertTrue("File exists", !test.exists()); + assertFalse("File is a directory", test.isDirectory()); + + assertTrue("Unable to delete",FileUtils.delete(test,true)); + } + /** * Given two lists of File arrays ensure they are the same length and all entries in Before are in After * |
