diff options
author | Nick Burch <nick@apache.org> | 2008-09-15 21:57:21 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2008-09-15 21:57:21 +0000 |
commit | f6e96990ba42022bb67f315484c29d8aaece05ca (patch) | |
tree | 47d03a4f97191371fbd6f6e9bd88df5fb4b3e21a /src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java | |
parent | febcf92fec50f2ebff906510643f97ee7a8a8e72 (diff) | |
download | poi-f6e96990ba42022bb67f315484c29d8aaece05ca.tar.gz poi-f6e96990ba42022bb67f315484c29d8aaece05ca.zip |
Merged revisions 695649 via svnmerge from
https://svn.apache.org/repos/asf/poi/trunk
........
r695649 | nick | 2008-09-15 22:51:14 +0100 (Mon, 15 Sep 2008) | 1 line
Fix inspired by bug #45804 - Update HSMF to handle Outlook 3.0 msg files, which have a different string chunk type
........
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@695651 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java')
-rw-r--r-- | src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java b/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java index dc4b531294..8f5dd47773 100644 --- a/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java +++ b/src/scratchpad/testcases/org/apache/poi/hsmf/model/TestChunkData.java @@ -31,42 +31,47 @@ import junit.framework.TestCase; * */ public class TestChunkData extends TestCase { + private Chunks chunks = Chunks.getInstance(false); + public void testChunkCreate() { - StringChunk chunk = new StringChunk(0x0200); + StringChunk chunk = new StringChunk(0x0200, false); TestCase.assertEquals("__substg1.0_0200001E", chunk.getEntryName()); /* test the lower and upper limits of the chunk ids */ - chunk = new StringChunk(0x0000); + chunk = new StringChunk(0x0000, false); TestCase.assertEquals("__substg1.0_0000001E", chunk.getEntryName()); - chunk = new StringChunk(0xFFFF); + chunk = new StringChunk(0xFFFF, false); TestCase.assertEquals("__substg1.0_FFFF001E", chunk.getEntryName()); + + chunk = new StringChunk(0xFFFF, true); + TestCase.assertEquals("__substg1.0_FFFF001F", chunk.getEntryName()); } public void testTextBodyChunk() { - StringChunk chunk = new StringChunk(0x1000); - TestCase.assertEquals(chunk.getEntryName(), Chunks.getInstance().textBodyChunk.getEntryName()); + StringChunk chunk = new StringChunk(0x1000, false); + TestCase.assertEquals(chunk.getEntryName(), chunks.textBodyChunk.getEntryName()); } public void testDisplayToChunk() { - StringChunk chunk = new StringChunk(0x0E04); - TestCase.assertEquals(chunk.getEntryName(), Chunks.getInstance().displayToChunk.getEntryName()); + StringChunk chunk = new StringChunk(0x0E04, false); + TestCase.assertEquals(chunk.getEntryName(), chunks.displayToChunk.getEntryName()); } public void testDisplayCCChunk() { - StringChunk chunk = new StringChunk(0x0E03); - TestCase.assertEquals(chunk.getEntryName(), Chunks.getInstance().displayCCChunk.getEntryName()); + StringChunk chunk = new StringChunk(0x0E03, false); + TestCase.assertEquals(chunk.getEntryName(), chunks.displayCCChunk.getEntryName()); } public void testDisplayBCCChunk() { - StringChunk chunk = new StringChunk(0x0E02); - TestCase.assertEquals(chunk.getEntryName(), Chunks.getInstance().displayBCCChunk.getEntryName()); + StringChunk chunk = new StringChunk(0x0E02, false); + TestCase.assertEquals(chunk.getEntryName(), chunks.displayBCCChunk.getEntryName()); } public void testSubjectChunk() { - Chunk chunk = new StringChunk(0x0037); - TestCase.assertEquals(chunk.getEntryName(), Chunks.getInstance().subjectChunk.getEntryName()); + Chunk chunk = new StringChunk(0x0037, false); + TestCase.assertEquals(chunk.getEntryName(), chunks.subjectChunk.getEntryName()); } } |