TestSlideAtompublic class TestSlideAtom extends TestCase Tests that SlideAtom works properly |
Fields Summary |
---|
private byte[] | data_a |
Methods Summary |
---|
public void | testFlags()
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
// First 12 bytes are a SSlideLayoutAtom, checked elsewhere
// Check the IDs
assertEquals(0x80000000, sa.getMasterID());
assertEquals(256, sa.getNotesID());
// Check the flags
assertEquals(true, sa.getFollowMasterObjects());
assertEquals(true, sa.getFollowMasterScheme());
assertEquals(true, sa.getFollowMasterBackground());
| public void | testRecordType()
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
assertEquals(1007l, sa.getRecordType());
| public void | testSSlideLayoutAtom()
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
SSlideLayoutAtom ssla = sa.getSSlideLayoutAtom();
assertEquals(0, ssla.getGeometryType());
// Should also check the placehold IDs at some point
| public void | testWrite()
SlideAtom sa = new SlideAtom(data_a, 0, data_a.length);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
sa.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]);
}
|
|