aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2016-10-19 23:43:42 +0000
committerAndreas Beeker <kiwiwings@apache.org>2016-10-19 23:43:42 +0000
commitecef10cb7b381f843e6d94ea97e91bcec385e2c8 (patch)
tree3a15f7d9156f05a4adf1e1aa98a7d2bd7cd0f599 /src/testcases/org
parentd64fea0cfe67a00dc84da2e2a706b6bb39e19849 (diff)
downloadpoi-ecef10cb7b381f843e6d94ea97e91bcec385e2c8.tar.gz
poi-ecef10cb7b381f843e6d94ea97e91bcec385e2c8.zip
remove *_dump directory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765734 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org')
-rw-r--r--src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java b/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java
index 00dfc7eaef..3c50507d15 100644
--- a/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java
+++ b/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java
@@ -52,7 +52,7 @@ public class TestPOIFSDump {
@After
public void tearDown() throws IOException {
// clean up the directory that POIFSDump writes to
- deleteDirectory(new File(new File(TEST_FILE).getName()));
+ deleteDirectory(new File(new File(TEST_FILE+"_dump").getName()));
}
public static void deleteDirectory(File directory) throws IOException {
@@ -172,7 +172,7 @@ public class TestPOIFSDump {
POIFSDump.main(new String[] {});
}
- @Test
+ @Test(expected=IndexOutOfBoundsException.class)
public void testFailToWrite() throws IOException {
File dir = TempFile.createTempFile("TestPOIFSDump", ".tst");
assertTrue("Had: " + dir, dir.exists());
@@ -186,13 +186,8 @@ public class TestPOIFSDump {
NPropertyTable props = fs.getPropertyTable();
assertNotNull(props);
- try {
- // try with an invalid startBlock to trigger an exception
- // to validate that file-handles are closed properly
- POIFSDump.dump(fs, 999999999, "mini-stream", dir);
- fail("Should catch exception here");
- } catch (IndexOutOfBoundsException e) {
- // expected here
- }
+ // try with an invalid startBlock to trigger an exception
+ // to validate that file-handles are closed properly
+ POIFSDump.dump(fs, 999999999, "mini-stream", dir);
}
} \ No newline at end of file