Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public void IfGivenASheetOfAWorkbookShouldGetTheIndexIfTheSheetExists()
        {
            _objectToTest = new SXSSFWorkbook();
            var sheet = _objectToTest.CreateSheet("test");

            var index = _objectToTest.GetSheetIndex(sheet);

            Assert.AreEqual(0, index);
        }