public void CellReadingStringDataTest(int worksheetIndex, int rowIndex, int columnIndex, string expectedCellValue) { IWorksheetReader worksheetReader = new WorksheetReader(filepath); var cellCoordinates = new ExcelCellCoordinates(worksheetIndex, rowIndex, columnIndex); var cellValue = worksheetReader.GetCellText(cellCoordinates); cellValue .Should() .Be(expectedCellValue); }
public IEnumerator <object[]> GetEnumerator() { var reader = new WorksheetReader(filepath); Action <ExcelCellCoordinates> getCellTextFunc = coordinates => reader.GetCellText(coordinates); Action <ExcelCellCoordinates> getCellDateTimeFunc = coordinates => reader.GetCellDateTimeAsUTC(coordinates); var getCellDataFuncs = new Action <ExcelCellCoordinates>[] { getCellTextFunc, getCellDateTimeFunc }; foreach (var func in getCellDataFuncs) { yield return(new object[] { 0, func }); yield return(new object[] { -1, func }); yield return(new object[] { -10, func }); } }