poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r953343 - in /poi/trunk: src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java test-data/document/MarkAuthorsTable.doc
Date Thu, 10 Jun 2010 15:02:05 GMT
Author: nick
Date: Thu Jun 10 15:02:05 2010
New Revision: 953343

URL: http://svn.apache.org/viewvc?rev=953343&view=rev
Log:
Add additional RevisionMarkAuthorTable test

Added:
    poi/trunk/test-data/document/MarkAuthorsTable.doc   (with props)
Modified:
    poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java

Modified: poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java?rev=953343&r1=953342&r2=953343&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java
(original)
+++ poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestRevisionMarkAuthorTable.java
Thu Jun 10 15:02:05 2010
@@ -47,5 +47,28 @@ public final class TestRevisionMarkAutho
 		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));
 	}
 }

Added: poi/trunk/test-data/document/MarkAuthorsTable.doc
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/document/MarkAuthorsTable.doc?rev=953343&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/test-data/document/MarkAuthorsTable.doc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message