TestDocumentAtompublic class TestDocumentAtom extends TestCase Tests that DocumentAtom works properly |
Fields Summary |
---|
private byte[] | data_a |
Methods Summary |
---|
public void | testBooleans()
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
assertEquals(false, da.getSaveWithFonts());
assertEquals(false, da.getOmitTitlePlace());
assertEquals(false, da.getRightToLeft());
assertEquals(true, da.getShowComments());
| public void | testMasterPersist()
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
assertEquals(2l, da.getNotesMasterPersist());
assertEquals(0l, da.getHandoutMasterPersist());
| public void | testRecordType()
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
assertEquals(1001l, da.getRecordType());
| public void | testSizeAndZoom()
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
assertEquals(5760l, da.getSlideSizeX());
assertEquals(4320l, da.getSlideSizeY());
assertEquals(4320l, da.getNotesSizeX());
assertEquals(5760l, da.getNotesSizeY());
assertEquals(5l, da.getServerZoomFrom());
assertEquals(10l, da.getServerZoomTo());
| public void | testSlideDetails()
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
assertEquals(1, da.getFirstSlideNum());
assertEquals(0, da.getSlideSizeType());
| public void | testWrite()
DocumentAtom da = new DocumentAtom(data_a, 0, data_a.length);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
da.writeOut(baos);
byte[] b = baos.toByteArray();
assertEquals(data_a.length, b.length);
for(int i=0; i<data_a.length; i++) {
assertEquals(data_a[i],b[i]);
}
|
|