Exemple #1
0
        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));
            }
        }
Exemple #2
0
 public void InstanciateWithInvalidIndex(int row, int column)
 {
     Assert.That(() => ExcelNumber.ToCellId(row, column), Throws.Exception.TypeOf <ArgumentOutOfRangeException>());
 }
Exemple #3
0
        public void ConvertToId(int row, int column, string expectedId)
        {
            var id = ExcelNumber.ToCellId(row, column);

            Assert.That(id, Is.EqualTo(expectedId));
        }