public void IfRequestingTheSheetIndexBySheetNameShouldReturnTheIndexOfTheXssfSheet() { _objectToTest = new SXSSFWorkbook(); _objectToTest.CreateSheet("test0"); _objectToTest.CreateSheet("test1"); _objectToTest.CreateSheet("test2"); var first = _objectToTest.GetSheetIndex("test0"); var second = _objectToTest.GetSheetIndex("test1"); var third = _objectToTest.GetSheetIndex("test2"); Assert.AreEqual(0, first); Assert.AreEqual(1, second); Assert.AreEqual(2, third); }
public void IfGivenASheetOfAWorkbookShouldGetTheIndexIfTheSheetExists() { _objectToTest = new SXSSFWorkbook(); var sheet = _objectToTest.CreateSheet("test"); var index = _objectToTest.GetSheetIndex(sheet); Assert.AreEqual(0, index); }