protected void SetUp() { this.excelRowParser = MockRepository.GenerateStub <IExcelRowParser>(); this.excelRowParser .Stub(rowParser => rowParser.ParseRows(Arg <List <ExcelColumn> > .Is.Anything, Arg <ISheet> .Is.Anything, Arg <CellRangeAddress> .Is.Anything)) .Return(new List <ExcelRow>() { new ExcelRow() { }, new ExcelRow(), new ExcelRow() }); this.excelTableParser = new ExcelTableParser(this.excelRowParser); var excelBytes = TestUtility.RetrieveMockExcelBytes("MockExcel1.xlsx"); MemoryStream tableStream = new MemoryStream(excelBytes); this.workbook = new XSSFWorkbook(tableStream); this.name = workbook.GetName("TableId_Table1"); }
public ExcelTableParser(IExcelRowParser excelRowParser) { this.excelRowParser = excelRowParser; }