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

TestRecordTypes

public class TestRecordTypes extends TestCase
Tests that RecordTypes returns the right records and classes when asked
author
Nick Burch (nick at torchbox dot com)

Fields Summary
Constructors Summary
Methods Summary
public voidtestEscherClassLookups()

		// Should all come back with null, as DDF handles them
		assertEquals(null, RecordTypes.recordHandlingClass(0xf000));
		assertEquals(null, RecordTypes.recordHandlingClass(0xf001));
	
public voidtestEscherNameLookups()

		assertEquals("EscherDggContainer", RecordTypes.recordName(0xf000));
		assertEquals("EscherClientTextbox", RecordTypes.recordName(0xf00d));
		assertEquals("EscherSelection", RecordTypes.recordName(0xf119));
	
public voidtestPPTClassLookups()

		assertEquals(Slide.class, RecordTypes.recordHandlingClass(1006));
		assertEquals(TextCharsAtom.class, RecordTypes.recordHandlingClass(4000));
		assertEquals(TextBytesAtom.class, RecordTypes.recordHandlingClass(4008));
		assertEquals(SlideListWithText.class, RecordTypes.recordHandlingClass(4080));

		// If this record is ever implemented, change to one that isn't!
		// This is checking the "unhandled default" stuff works
		assertEquals(UnknownRecordPlaceholder.class, RecordTypes.recordHandlingClass(2019));
	
public voidtestPPTNameLookups()

		assertEquals("MainMaster", RecordTypes.recordName(1016));
		assertEquals("TextBytesAtom", RecordTypes.recordName(4008));
		assertEquals("VBAInfo", RecordTypes.recordName(1023));