summaryrefslogtreecommitdiff
path: root/java/common/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/common/src/test')
-rw-r--r--java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java16
1 files changed, 15 insertions, 1 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 76d39200c1..94e7e20a86 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
@@ -287,9 +287,23 @@ public class FileUtilsTest extends TestCase
assertTrue("File exists", !test.exists());
assertFalse("File is a directory", test.isDirectory());
- assertTrue("Unable to delete",FileUtils.delete(test,true));
+ assertTrue("Delete Succeeded ", !FileUtils.delete(test, true));
}
+ public void testDeleteNull()
+ {
+ try
+ {
+ FileUtils.delete(null, true);
+ fail("Delete with null value should throw NPE.");
+ }
+ catch (NullPointerException npe)
+ {
+ // expected path
+ }
+ }
+
+
/**
* Given two lists of File arrays ensure they are the same length and all entries in Before are in After
*