Use a chunk that really isn't there, to avoid issues when we start to support message dates better

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1398237 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2012-10-15 10:36:30 +00:00
parent d8849d8c50
commit a2300daefe

View File

@ -123,13 +123,14 @@ public final class TestBasics extends TestCase {
}
/**
* Test missing chunks
* Test missing chunks.
* Use a file with no HTML body
*/
public void testMissingChunks() throws Exception {
assertEquals(false, attachments.isReturnNullOnMissingChunk());
try {
attachments.getMessageDate();
attachments.getHtmlBody();
fail();
} catch(ChunkNotFoundException e) {
// Good
@ -137,12 +138,12 @@ public final class TestBasics extends TestCase {
attachments.setReturnNullOnMissingChunk(true);
assertEquals(null, attachments.getMessageDate());
assertEquals(null, attachments.getHtmlBody());
attachments.setReturnNullOnMissingChunk(false);
try {
attachments.getMessageDate();
attachments.getHtmlBody();
fail();
} catch(ChunkNotFoundException e) {
// Good