TestUserEditAtompublic class TestUserEditAtom extends TestCase Tests that UserEditAtom works properly |
Fields Summary |
---|
private byte[] | data_a |
Methods Summary |
---|
public void | testFlags()
UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length);
assertEquals(256, uea.getLastViewedSlideID() );
//assertEquals(0x030018D9, uea.getPPTVersion() );
assertEquals(0, uea.getLastUserEditAtomOffset() );
assertEquals(0x1800, uea.getPersistPointersOffset() );
assertEquals(1, uea.getDocPersistRef() );
assertEquals(5, uea.getMaxPersistWritten() );
assertEquals((short)1, uea.getLastViewType() );
| public void | testRecordType()
UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length);
assertEquals(4085l, uea.getRecordType());
| public void | testWrite()
UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
uea.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]);
}
|
|