Add additional RevisionMarkAuthorTable test

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@953343 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2010-06-10 15:02:05 +00:00
parent 5696c265f4
commit 129cf711e1
2 changed files with 23 additions and 0 deletions

View File

@ -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));
}
}

Binary file not shown.