Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rye authored and Rye committed Feb 9, 2017
1 parent 7ae534f commit 2a4227d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions testcases/ooxml/XSSF/Streaming/SXSSFWorkbookTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,21 @@ public void IfWriting20WorksheetsWith10000x100CellsShouldNotThrowOutOfMemoryExce
File.Delete(savePath);
}

[Test]
public void IfWriting20WorksheetsWith10000x100CellsUsingGzipShouldNotThrowOutOfMemoryException()
{
_objectToTest = new SXSSFWorkbook(null, 100, true);
var sheets = 20;
var rows = 10000;
var cols = 100;
AddCells(_objectToTest, sheets, rows, cols, CellType.Numeric);
var savePath = Environment.CurrentDirectory + "\\largeGzipWorksheet.xlsx";
WriteFile(savePath, _objectToTest);

Assert.True(File.Exists(savePath));
File.Delete(savePath);
}


private void AddCells(IWorkbook wb, int sheets, int rows, int columns, CellType type)
{
Expand Down

0 comments on commit 2a4227d

Please sign in to comment.