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:
parent
d8849d8c50
commit
a2300daefe
@ -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 {
|
public void testMissingChunks() throws Exception {
|
||||||
assertEquals(false, attachments.isReturnNullOnMissingChunk());
|
assertEquals(false, attachments.isReturnNullOnMissingChunk());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
attachments.getMessageDate();
|
attachments.getHtmlBody();
|
||||||
fail();
|
fail();
|
||||||
} catch(ChunkNotFoundException e) {
|
} catch(ChunkNotFoundException e) {
|
||||||
// Good
|
// Good
|
||||||
@ -137,12 +138,12 @@ public final class TestBasics extends TestCase {
|
|||||||
|
|
||||||
attachments.setReturnNullOnMissingChunk(true);
|
attachments.setReturnNullOnMissingChunk(true);
|
||||||
|
|
||||||
assertEquals(null, attachments.getMessageDate());
|
assertEquals(null, attachments.getHtmlBody());
|
||||||
|
|
||||||
attachments.setReturnNullOnMissingChunk(false);
|
attachments.setReturnNullOnMissingChunk(false);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
attachments.getMessageDate();
|
attachments.getHtmlBody();
|
||||||
fail();
|
fail();
|
||||||
} catch(ChunkNotFoundException e) {
|
} catch(ChunkNotFoundException e) {
|
||||||
// Good
|
// Good
|
||||||
|
Loading…
Reference in New Issue
Block a user