You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2016/10/19 23:43:43 UTC

svn commit: r1765734 - /poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java

Author: kiwiwings
Date: Wed Oct 19 23:43:42 2016
New Revision: 1765734

URL: http://svn.apache.org/viewvc?rev=1765734&view=rev
Log:
remove *_dump directory

Modified:
    poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java

Modified: poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java?rev=1765734&r1=1765733&r2=1765734&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/poifs/dev/TestPOIFSDump.java Wed Oct 19 23:43:42 2016
@@ -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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org