aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/poifs
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2015-05-26 18:03:29 +0000
committerNick Burch <nick@apache.org>2015-05-26 18:03:29 +0000
commit9b20ef64bc45c8b2d19fa3774a35c41b6e59efb9 (patch)
treeaf77dd20888aafcb8ec8cc50a5a01d36a261bfab /src/testcases/org/apache/poi/poifs
parentf51479df57d59e462ce324b5c0d2148450c35aa6 (diff)
downloadpoi-9b20ef64bc45c8b2d19fa3774a35c41b6e59efb9.tar.gz
poi-9b20ef64bc45c8b2d19fa3774a35c41b6e59efb9.zip
Force OPOIFS test to explicitly create OPOIFS instance
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1681803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/poifs')
-rw-r--r--src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java b/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
index bbb9b9db12..2655b44140 100644
--- a/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
+++ b/src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
@@ -35,7 +35,7 @@ import org.apache.poi.poifs.storage.HeaderBlock;
import org.apache.poi.poifs.storage.RawDataBlockList;
/**
- * Tests for POIFSFileSystem
+ * Tests for the older OPOIFS-based POIFSFileSystem
*/
public final class TestPOIFSFileSystem extends TestCase {
private POIDataSamples _samples = POIDataSamples.getPOIFSInstance();
@@ -104,7 +104,7 @@ public final class TestPOIFSFileSystem extends TestCase {
// Normal case - read until EOF and close
testIS = new TestIS(openSampleStream("13224.xls"), -1);
try {
- new POIFSFileSystem(testIS);
+ new OPOIFSFileSystem(testIS);
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -113,7 +113,7 @@ public final class TestPOIFSFileSystem extends TestCase {
// intended to crash after reading 10000 bytes
testIS = new TestIS(openSampleStream("13224.xls"), 10000);
try {
- new POIFSFileSystem(testIS);
+ new OPOIFSFileSystem(testIS);
fail("ex should have been thrown");
} catch (IOException e) {
throw new RuntimeException(e);
@@ -141,7 +141,7 @@ public final class TestPOIFSFileSystem extends TestCase {
for(int i=0; i<files.length; i++) {
// Open the file up
- POIFSFileSystem fs = new POIFSFileSystem(
+ OPOIFSFileSystem fs = new OPOIFSFileSystem(
_samples.openResourceAsStream(files[i])
);
@@ -163,7 +163,7 @@ public final class TestPOIFSFileSystem extends TestCase {
try {
InputStream stream = _samples.openResourceAsStream("ReferencesInvalidSectors.mpp");
try {
- new POIFSFileSystem(stream);
+ new OPOIFSFileSystem(stream);
fail("File is corrupt and shouldn't have been opened");
} finally {
stream.close();
@@ -182,7 +182,7 @@ public final class TestPOIFSFileSystem extends TestCase {
*/
public void testBATandXBAT() throws Exception {
byte[] hugeStream = new byte[8*1024*1024];
- POIFSFileSystem fs = new POIFSFileSystem();
+ OPOIFSFileSystem fs = new OPOIFSFileSystem();
fs.getRoot().createDocument(
"BIG", new ByteArrayInputStream(hugeStream)
);
@@ -226,7 +226,7 @@ public final class TestPOIFSFileSystem extends TestCase {
// Now load it and check
fs = null;
- fs = new POIFSFileSystem(
+ fs = new OPOIFSFileSystem(
new ByteArrayInputStream(fsData)
);
@@ -260,7 +260,7 @@ public final class TestPOIFSFileSystem extends TestCase {
assertEquals(15, data_blocks.blockCount());
// Now try and open properly
- POIFSFileSystem fs = new POIFSFileSystem(
+ OPOIFSFileSystem fs = new OPOIFSFileSystem(
_samples.openResourceAsStream("BlockSize4096.zvi"));
assertTrue(fs.getRoot().getEntryCount() > 3);
@@ -268,7 +268,7 @@ public final class TestPOIFSFileSystem extends TestCase {
checkAllDirectoryContents(fs.getRoot());
// Finally, check we can do a similar 512byte one too
- fs = new POIFSFileSystem(
+ fs = new OPOIFSFileSystem(
_samples.openResourceAsStream("BlockSize512.zvi"));
assertTrue(fs.getRoot().getEntryCount() > 3);
checkAllDirectoryContents(fs.getRoot());