poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r386987 - /jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
Date Sun, 19 Mar 2006 16:10:07 GMT
Author: nick
Date: Sun Mar 19 08:10:07 2006
New Revision: 386987

URL: http://svn.apache.org/viewcvs?rev=386987&view=rev
Log:
Test for new Environment record

Modified:
    jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java

Modified: jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
URL: http://svn.apache.org/viewcvs/jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java?rev=386987&r1=386986&r2=386987&view=diff
==============================================================================
--- jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
(original)
+++ jakarta/poi/trunk/src/scratchpad/testcases/org/apache/poi/hslf/record/TestDocument.java
Sun Mar 19 08:10:07 2006
@@ -28,6 +28,7 @@
 
 /**
  * Tests that Document works properly
+ * (Also tests Environment while we're at it)
  *
  * @author Nick Burch (nick at torchbox dot com)
  */
@@ -66,7 +67,7 @@
     	assertTrue(dr.getDocumentAtom() instanceof DocumentAtom);
     	
     	assertNotNull(dr.getEnvironment());
-    	assertEquals(RecordTypes.Environment.typeID, dr.getEnvironment().getRecordType());
+    	assertTrue(dr.getEnvironment() instanceof Environment);
     	
     	assertNotNull(dr.getSlideListWithTexts());
     	assertEquals(3, dr.getSlideListWithTexts().length);
@@ -76,6 +77,15 @@
     	assertTrue(dr.getSlideListWithTexts()[1] instanceof SlideListWithText);
     	assertNotNull(dr.getSlideListWithTexts()[2]);
     	assertTrue(dr.getSlideListWithTexts()[2] instanceof SlideListWithText);
+    }
+    
+    public void testEnvironment() throws Exception {
+    	Document dr = getDocRecord();
+    	Environment env = dr.getEnvironment();
+    	
+    	assertEquals(1010, env.getRecordType());
+    	assertNotNull(env.getFontCollection());
+    	assertTrue(env.getFontCollection() instanceof FontCollection);
     }
     
     // No need to check re-writing - hslf.TestReWrite does all that for us



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


Mime
View raw message