public void GetCellByValidId(int row, int column) { var id = ExcelNumber.ToCellId(row, column); using (var book = Book.Open(BookTest.NormalData)) { var sheet = book["TestSheet1"]; Assert.That(sheet[id], Is.Not.Null); Assert.That(sheet[id].Row.Index, Is.EqualTo(row)); Assert.That(sheet[id].Index, Is.EqualTo(column)); } }
public void InstanciateWithInvalidIndex(int row, int column) { Assert.That(() => ExcelNumber.ToCellId(row, column), Throws.Exception.TypeOf <ArgumentOutOfRangeException>()); }
public void ConvertToId(int row, int column, string expectedId) { var id = ExcelNumber.ToCellId(row, column); Assert.That(id, Is.EqualTo(expectedId)); }