Test for new Environment record
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@386987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb53534020
commit
7cfd0162a7
@ -28,6 +28,7 @@ import org.apache.poi.poifs.filesystem.*;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that Document works properly
|
* Tests that Document works properly
|
||||||
|
* (Also tests Environment while we're at it)
|
||||||
*
|
*
|
||||||
* @author Nick Burch (nick at torchbox dot com)
|
* @author Nick Burch (nick at torchbox dot com)
|
||||||
*/
|
*/
|
||||||
@ -66,7 +67,7 @@ public class TestDocument extends TestCase {
|
|||||||
assertTrue(dr.getDocumentAtom() instanceof DocumentAtom);
|
assertTrue(dr.getDocumentAtom() instanceof DocumentAtom);
|
||||||
|
|
||||||
assertNotNull(dr.getEnvironment());
|
assertNotNull(dr.getEnvironment());
|
||||||
assertEquals(RecordTypes.Environment.typeID, dr.getEnvironment().getRecordType());
|
assertTrue(dr.getEnvironment() instanceof Environment);
|
||||||
|
|
||||||
assertNotNull(dr.getSlideListWithTexts());
|
assertNotNull(dr.getSlideListWithTexts());
|
||||||
assertEquals(3, dr.getSlideListWithTexts().length);
|
assertEquals(3, dr.getSlideListWithTexts().length);
|
||||||
@ -78,5 +79,14 @@ public class TestDocument extends TestCase {
|
|||||||
assertTrue(dr.getSlideListWithTexts()[2] instanceof SlideListWithText);
|
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
|
// No need to check re-writing - hslf.TestReWrite does all that for us
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user