use of org.apache.poi.hssf.record.pivottable.PageItemRecord in project poi by apache.
the class TestPageItemRecord method confirmSerialize.
private static PageItemRecord confirmSerialize(String hexDump) {
byte[] data = HexRead.readFromString(hexDump);
RecordInputStream in = TestcaseRecordInputStream.create(PageItemRecord.sid, data);
PageItemRecord rec = new PageItemRecord(in);
assertEquals(0, in.remaining());
assertEquals(4 + data.length, rec.getRecordSize());
byte[] data2 = rec.serialize();
TestcaseRecordInputStream.confirmRecordEncoding(PageItemRecord.sid, data, data2);
return rec;
}
use of org.apache.poi.hssf.record.pivottable.PageItemRecord in project poi by apache.
the class TestPageItemRecord method testMoreThanOneInfoItem_bug46917.
public void testMoreThanOneInfoItem_bug46917() {
byte[] data = HexRead.readFromString("01 02 03 04 05 06 07 08 09 0A 0B 0C");
RecordInputStream in = TestcaseRecordInputStream.create(PageItemRecord.sid, data);
PageItemRecord rec = new PageItemRecord(in);
if (in.remaining() == 6) {
throw new AssertionFailedError("Identified bug 46917");
}
assertEquals(0, in.remaining());
assertEquals(4 + data.length, rec.getRecordSize());
}
Aggregations