FileDocCategorySizeDatePackage
TestUserEditAtom.javaAPI DocApache Poi 3.0.12419Mon Jan 01 18:56:12 GMT 2007org.apache.poi.hslf.record

TestUserEditAtom

public class TestUserEditAtom extends TestCase
Tests that UserEditAtom works properly
author
Nick Burch (nick at torchbox dot com)

Fields Summary
private byte[]
data_a
Constructors Summary
Methods Summary
public voidtestFlags()

		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 voidtestRecordType()


         
		UserEditAtom uea = new UserEditAtom(data_a, 0, data_a.length);
		assertEquals(4085l, uea.getRecordType());
	
public voidtestWrite()

		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]);
		}