diff options
author | Yegor Kozlov <yegor@apache.org> | 2009-08-23 12:34:24 +0000 |
---|---|---|
committer | Yegor Kozlov <yegor@apache.org> | 2009-08-23 12:34:24 +0000 |
commit | 2712b14d2f43f51e80818936b0de97d36865ee3b (patch) | |
tree | 86c800395ba7ccc7ed084f080f1bd5ed7f2e0bc7 /src/testcases/org/apache/poi/poifs/filesystem | |
parent | e8b5f3670405426c04e3e2fb12400fceb375c8d2 (diff) | |
download | poi-2712b14d2f43f51e80818936b0de97d36865ee3b.tar.gz poi-2712b14d2f43f51e80818936b0de97d36865ee3b.zip |
moved all test data to a top-level directory, refactored all junit usages of .testdata.path to one place
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@806959 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/poifs/filesystem')
-rwxr-xr-x | src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java b/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java index 4a948ba8c6..095dd58317 100755 --- a/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java +++ b/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java @@ -26,6 +26,7 @@ import java.io.InputStream; import junit.framework.TestCase; import org.apache.poi.hssf.HSSFTestDataSamples; +import org.apache.poi.POIDataSamples; /** * Tests for POIFSFileSystem @@ -134,15 +135,13 @@ public final class TestPOIFSFileSystem extends TestCase { String[] files = new String[] { "ShortLastBlock.qwp", "ShortLastBlock.wps" }; - String pdirname = System.getProperty("POIFS.testdata.path"); - for(int i=0; i<files.length; i++) { - File f = new File(pdirname, files[i]); - assertTrue(f.exists()); - + POIDataSamples _samples = POIDataSamples.getPOIFSInstance(); + for(int i=0; i<files.length; i++) { + // Open the file up POIFSFileSystem fs = new POIFSFileSystem( - new FileInputStream(f) + _samples.openResourceAsStream(files[i]) ); // Write it into a temp output array |