public void TestStartBlock_EndBlock_Write() { HSSFWorkbook wb = HSSFTestDataSamples.OpenSampleWorkbook("chartdemo.xls"); Record[] sheetRecs = RecordInspector.GetRecords(wb.GetSheetAt(0), 0); RecordStream rs = new RecordStream(Arrays.AsList(sheetRecs), 0); rs.FindChartSubStream(); int pos = rs.GetCountRead(); ChartSheetAggregate csAgg = new ChartSheetAggregate(rs, null); RecordInspector.RecordCollector rv = new RecordInspector.RecordCollector(); csAgg.VisitContainedRecords(rv); Record[] outRecs = rv.Records; for (int i = 0; i < outRecs.Length; i++) { Assert.AreEqual(sheetRecs[pos + i].GetType(), outRecs[i].GetType()); } }