diff options
author | Nick Burch <nick@apache.org> | 2010-06-10 15:02:05 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2010-06-10 15:02:05 +0000 |
commit | 129cf711e1361a879e9ab92d09212107816449ee (patch) | |
tree | 5f19f7319e15a913a2f9d44423bdacf07ab95bce | |
parent | 5696c265f492dbe441dcfb7f86f62055f2ddd14a (diff) | |
download | poi-129cf711e1361a879e9ab92d09212107816449ee.tar.gz poi-129cf711e1361a879e9ab92d09212107816449ee.zip |
Add additional RevisionMarkAuthorTable test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@953343 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java | 23 | ||||
-rw-r--r-- | test-data/document/MarkAuthorsTable.doc | bin | 0 -> 76800 bytes |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java index 3b541e766b..6ef2d2b906 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java @@ -47,5 +47,28 @@ public final class TestRevisionMarkAuthorTable extends TestCase { assertNotNull(rmt); assertEquals(1, rmt.getSize()); assertEquals("Unknown", rmt.getAuthor(0)); + + assertEquals(null, rmt.getAuthor(1)); + assertEquals(null, rmt.getAuthor(2)); + assertEquals(null, rmt.getAuthor(3)); + } + + /** + * Several authors, one of whom has no name + */ + public void testMultipleAuthors() { + HWPFDocument doc = HWPFTestDataSamples.openSampleFile("MarkAuthorsTable.doc"); + + RevisionMarkAuthorTable rmt = doc.getRevisionMarkAuthorTable(); + assertNotNull(rmt); + assertEquals(4, rmt.getSize()); + assertEquals("Unknown", rmt.getAuthor(0)); + assertEquals("BSanders", rmt.getAuthor(1)); + assertEquals(" ", rmt.getAuthor(2)); + assertEquals("Ryan Lauck", rmt.getAuthor(3)); + + assertEquals(null, rmt.getAuthor(4)); + assertEquals(null, rmt.getAuthor(5)); + assertEquals(null, rmt.getAuthor(6)); } } diff --git a/test-data/document/MarkAuthorsTable.doc b/test-data/document/MarkAuthorsTable.doc Binary files differnew file mode 100644 index 0000000000..acafa3aa4d --- /dev/null +++ b/test-data/document/MarkAuthorsTable.doc |