public void testToString() throws Exception {
String nl = System.getProperty("line.separator");
EscherOptRecord r = new EscherOptRecord();
r.setOptions((short)0x000F);
r.setRecordId(EscherOptRecord.RECORD_ID);
EscherProperty prop1 = new EscherBoolProperty((short)1, 1);
r.addEscherProperty(prop1);
String expected = "org.apache.poi.ddf.EscherOptRecord:" + nl +
" isContainer: true" + nl +
" options: 0x0013" + nl +
" recordId: 0x" + HexDump.toHex(EscherOptRecord.RECORD_ID) + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" propNum: 1, propName: unknown, complex: false, blipId: false, value: 1 (0x00000001)" + nl;
assertEquals( expected, r.toString());
}
|