Migrate ExcelIO from ClosedXML to NPOI
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
using ClosedXML.Excel;
|
||||
using JdeScoping.ExcelIO.Tests.Fixtures;
|
||||
using Shouldly;
|
||||
using Xunit;
|
||||
|
||||
namespace JdeScoping.ExcelIO.Tests.Integration;
|
||||
|
||||
public class LargeDataSetTests : IClassFixture<LargeDataSetFixture>
|
||||
{
|
||||
private readonly XLWorkbook _workbook;
|
||||
|
||||
public LargeDataSetTests(LargeDataSetFixture fixture)
|
||||
{
|
||||
_workbook = fixture.Workbook;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TableRowCount_Is1001()
|
||||
{
|
||||
var sheet = _workbook.Worksheet("Search Results");
|
||||
var table = sheet.Tables.First();
|
||||
table.RowCount().ShouldBe(1001); // 1 header + 1000 data rows
|
||||
}
|
||||
}
|
||||
using JdeScoping.ExcelIO.Tests.Fixtures;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using Shouldly;
|
||||
using Xunit;
|
||||
|
||||
namespace JdeScoping.ExcelIO.Tests.Integration;
|
||||
|
||||
public class LargeDataSetTests : IClassFixture<LargeDataSetFixture>
|
||||
{
|
||||
private readonly XSSFWorkbook _workbook;
|
||||
|
||||
public LargeDataSetTests(LargeDataSetFixture fixture)
|
||||
{
|
||||
_workbook = fixture.Workbook;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TableRowCount_Is1001()
|
||||
{
|
||||
var sheet = _workbook.GetSheet("Search Results")!;
|
||||
var table = ExcelTestHelpers.GetFirstTable(sheet);
|
||||
ExcelTestHelpers.GetTableRowCount(table).ShouldBe(1001);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user