diff options
author | Javen O'Neal <onealj@apache.org> | 2016-07-04 01:07:52 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-07-04 01:07:52 +0000 |
commit | b8ff07d06461b31ee8e6867daec51abfc87906d9 (patch) | |
tree | 83bf13e0cd9aff2dcf993da634ba5807257aaf4a /src/testcases/org | |
parent | a2d96fe7e3225a0ae843738c45c82412094ad1af (diff) | |
download | poi-b8ff07d06461b31ee8e6867daec51abfc87906d9.tar.gz poi-b8ff07d06461b31ee8e6867daec51abfc87906d9.zip |
bug 59166: suggest alternative implementations for TempFileCreationStrategy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751190 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org')
-rw-r--r-- | src/testcases/org/apache/poi/util/TestTempFile.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/testcases/org/apache/poi/util/TestTempFile.java b/src/testcases/org/apache/poi/util/TestTempFile.java index 498b1daf8c..e893f00c52 100644 --- a/src/testcases/org/apache/poi/util/TestTempFile.java +++ b/src/testcases/org/apache/poi/util/TestTempFile.java @@ -20,7 +20,6 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; import java.io.File; import java.io.FileOutputStream; @@ -57,7 +56,7 @@ public class TestTempFile { String[] files = tempDir.list(); // can have the "poifiles" subdir if(files.length == 1) { - assertEquals("Had: " + Arrays.toString(files), "poifiles", files[0]); + assertEquals("Had: " + Arrays.toString(files), DefaultTempFileCreationStrategy.POIFILES, files[0]); files = new File(tempDir, files[0]).list(); assertEquals("Had: " + Arrays.toString(files), 0, files.length); } else { @@ -96,7 +95,7 @@ public class TestTempFile { assertTrue("temp file's name should end with .txt", tempFile.getName().endsWith(".txt")); assertEquals("temp file is saved in poifiles directory", - "poifiles", tempFile.getParentFile().getName()); + DefaultTempFileCreationStrategy.POIFILES, tempFile.getParentFile().getName()); // Can't think of a good way to check whether a file is actually deleted since it would require the VM to stop. // Solution: set TempFileCreationStrategy to something that the unit test can trigger a deletion" @@ -119,7 +118,7 @@ public class TestTempFile { assertTrue("testDir's name starts with testDir", tempDir.getName().startsWith("testDir")); assertEquals("tempDir is saved in poifiles directory", - "poifiles", tempDir.getParentFile().getName()); + DefaultTempFileCreationStrategy.POIFILES, tempDir.getParentFile().getName()); // Can't think of a good way to check whether a directory is actually deleted since it would require the VM to stop. // Solution: set TempFileCreationStrategy to something that the unit test can trigger a deletion" |