From 01bd0b4a3987865c6f1305ff47d7ad617696b9b5 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 17 Apr 2016 11:25:35 +0000 Subject: revert r1739548 and r1739550. I could not figure out how to add BaseTestXWorkbook|Sheet|Row.java without causing junit to complain about 'Test class should have exactly one public constructor' git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1739580 13f79535-47bb-0310-9956-ffa450edef68 --- src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java') diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java index 6d81606383..830298181c 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java @@ -51,10 +51,10 @@ public abstract class BaseTestSheet { @Rule public ExpectedException thrown = ExpectedException.none(); - protected final ITestDataProvider _testDataProvider; + private final ITestDataProvider _testDataProvider; protected BaseTestSheet(ITestDataProvider testDataProvider) { - _testDataProvider = testDataProvider; + _testDataProvider = testDataProvider; } protected void trackColumnsForAutoSizingIfSXSSF(Sheet sheet) { @@ -116,9 +116,7 @@ public abstract class BaseTestSheet { } } - @Test(expected=IllegalArgumentException.class) - public void createRowAfterLastRow() throws IOException { - final SpreadsheetVersion version = _testDataProvider.getSpreadsheetVersion(); + protected void createRowAfterLastRow(SpreadsheetVersion version) throws IOException { final Workbook workbook = _testDataProvider.createWorkbook(); final Sheet sh = workbook.createSheet(); sh.createRow(version.getLastRowIndex()); @@ -130,6 +128,7 @@ public abstract class BaseTestSheet { } } + @Test public void removeRow() throws IOException { Workbook workbook = _testDataProvider.createWorkbook(); -- cgit v1.2.3