mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
Sonar fixes
JUnit5 test classes and methods should have default package visibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a7d741fd17
commit
8631e6c9c9
@ -272,33 +272,33 @@ public class TestBuildFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMissingFilename() {
|
void testMissingFilename() {
|
||||||
expectSpecificBuildException("test-nofile", "required argument not specified",
|
expectSpecificBuildException("test-nofile", "required argument not specified",
|
||||||
"fileName attribute must be set!");
|
"fileName attribute must be set!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFileNotFound() {
|
void testFileNotFound() {
|
||||||
expectSpecificBuildException("test-filenotfound", "required argument not specified",
|
expectSpecificBuildException("test-filenotfound", "required argument not specified",
|
||||||
"Cannot load file invalid.xls. Make sure the path and file permissions are correct.");
|
"Cannot load file invalid.xls. Make sure the path and file permissions are correct.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEvaluate() {
|
void testEvaluate() {
|
||||||
executeTarget("test-evaluate");
|
executeTarget("test-evaluate");
|
||||||
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
assertLogContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
assertLogContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEvaluateNoDetails() {
|
void testEvaluateNoDetails() {
|
||||||
executeTarget("test-evaluate-nodetails");
|
executeTarget("test-evaluate-nodetails");
|
||||||
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
assertLogNotContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
assertLogNotContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPrecision() {
|
void testPrecision() {
|
||||||
executeTarget("test-precision");
|
executeTarget("test-precision");
|
||||||
|
|
||||||
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
@ -312,46 +312,46 @@ public class TestBuildFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPrecisionFail() {
|
void testPrecisionFail() {
|
||||||
expectSpecificBuildException("test-precision-fails", "precision not matched",
|
expectSpecificBuildException("test-precision-fails", "precision not matched",
|
||||||
"\tFailed to evaluate cell 'MortgageCalculator'!$B$4. It evaluated to 2285.5761494145563 when the value of 2285.576149 with precision of 1.0E-10 was expected.");
|
"\tFailed to evaluate cell 'MortgageCalculator'!$B$4. It evaluated to 2285.5761494145563 when the value of 2285.576149 with precision of 1.0E-10 was expected.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPassOnError() {
|
void testPassOnError() {
|
||||||
executeTarget("test-passonerror");
|
executeTarget("test-passonerror");
|
||||||
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
assertLogContaining("Test named failonerror failed because 1 of 0 evaluations failed to evaluate correctly.");
|
assertLogContaining("Test named failonerror failed because 1 of 0 evaluations failed to evaluate correctly.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFailOnError() {
|
void testFailOnError() {
|
||||||
expectBuildException("test-failonerror", "fail on error");
|
expectBuildException("test-failonerror", "fail on error");
|
||||||
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
assertLogNotContaining("failed because 1 of 0 evaluations failed to evaluate correctly. Failed to evaluate cell 'MortageCalculatorFunction'!$D$3");
|
assertLogNotContaining("failed because 1 of 0 evaluations failed to evaluate correctly. Failed to evaluate cell 'MortageCalculatorFunction'!$D$3");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFailOnErrorNoDetails() {
|
void testFailOnErrorNoDetails() {
|
||||||
expectBuildException("test-failonerror-nodetails", "fail on error");
|
expectBuildException("test-failonerror-nodetails", "fail on error");
|
||||||
assertLogNotContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogNotContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
assertLogNotContaining("failed because 1 of 0 evaluations failed to evaluate correctly. Failed to evaluate cell 'MortageCalculatorFunction'!$D$3");
|
assertLogNotContaining("failed because 1 of 0 evaluations failed to evaluate correctly. Failed to evaluate cell 'MortageCalculatorFunction'!$D$3");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUdf() {
|
void testUdf() {
|
||||||
executeTarget("test-udf");
|
executeTarget("test-udf");
|
||||||
assertLogContaining("1/1 tests passed");
|
assertLogContaining("1/1 tests passed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetText() {
|
void testSetText() {
|
||||||
executeTarget("test-settext");
|
executeTarget("test-settext");
|
||||||
assertLogContaining("1/1 tests passed");
|
assertLogContaining("1/1 tests passed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddHandler() {
|
void testAddHandler() {
|
||||||
executeTarget("test-addhandler");
|
executeTarget("test-addhandler");
|
||||||
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
assertLogContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
assertLogContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
||||||
@ -361,14 +361,14 @@ public class TestBuildFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddHandlerWrongClass() {
|
void testAddHandlerWrongClass() {
|
||||||
executeTarget("test-addhandler-wrongclass");
|
executeTarget("test-addhandler-wrongclass");
|
||||||
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
assertLogContaining("Using input file: " + TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls");
|
||||||
assertLogContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
assertLogContaining("Succeeded when evaluating 'MortgageCalculator'!$B$4.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddHandlerFails() {
|
void testAddHandlerFails() {
|
||||||
expectSpecificBuildException("test-addhandler-fails", "NullPointException", null);
|
expectSpecificBuildException("test-addhandler-fails", "NullPointException", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ public class TestExcelAntPrecision {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testVerifyPrecision() {
|
void testVerifyPrecision() {
|
||||||
|
|
||||||
double value = 1.0E-1 ;
|
double value = 1.0E-1 ;
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ public class TestExcelAntSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetter() {
|
void testSetter() {
|
||||||
String cell = "simpleCellRef!$F$1" ;
|
String cell = "simpleCellRef!$F$1" ;
|
||||||
|
|
||||||
fixture.setCell( cell ) ;
|
fixture.setCell( cell ) ;
|
||||||
@ -58,7 +58,7 @@ public class TestExcelAntSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetWorkbookUtil() {
|
void testSetWorkbookUtil() {
|
||||||
ExcelAntWorkbookUtil util = ExcelAntWorkbookUtilFactory.getInstance(
|
ExcelAntWorkbookUtil util = ExcelAntWorkbookUtilFactory.getInstance(
|
||||||
mortgageCalculatorFileName ) ;
|
mortgageCalculatorFileName ) ;
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class TestExcelAntSetDoubleCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetDouble() {
|
void testSetDouble() {
|
||||||
String cellId = "'Sheet3'!$A$1" ;
|
String cellId = "'Sheet3'!$A$1" ;
|
||||||
double testValue = 1.1 ;
|
double testValue = 1.1 ;
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ public class TestExcelAntUserDefinedFunction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetClassName() {
|
void testSetClassName() {
|
||||||
String className = "simple.class.name" ;
|
String className = "simple.class.name" ;
|
||||||
|
|
||||||
fixture.setClassName( className ) ;
|
fixture.setClassName( className ) ;
|
||||||
@ -43,7 +43,7 @@ public class TestExcelAntUserDefinedFunction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetFunction() {
|
void testSetFunction() {
|
||||||
String functionAlias = "alias" ;
|
String functionAlias = "alias" ;
|
||||||
|
|
||||||
fixture.setFunctionAlias( functionAlias ) ;
|
fixture.setFunctionAlias( functionAlias ) ;
|
||||||
|
|||||||
@ -49,26 +49,26 @@ public class TestExcelAntEvaluationResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCompletedWithErrorMessage() {
|
void testCompletedWithErrorMessage() {
|
||||||
String errMsg = fixture.getErrorMessage();
|
String errMsg = fixture.getErrorMessage();
|
||||||
assertNotNull(errMsg);
|
assertNotNull(errMsg);
|
||||||
assertEquals(errMsg, errMessage);
|
assertEquals(errMsg, errMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testPassed() {
|
void testPassed() {
|
||||||
boolean passedValue = fixture.didTestPass();
|
boolean passedValue = fixture.didTestPass();
|
||||||
assertEquals(passedValue, passed);
|
assertEquals(passedValue, passed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDelta() {
|
void testDelta() {
|
||||||
double deltaValue = fixture.getDelta();
|
double deltaValue = fixture.getDelta();
|
||||||
assertEquals(deltaValue, delta, 0.0);
|
assertEquals(deltaValue, delta, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCellId() {
|
void testCellId() {
|
||||||
String cellIdValue = fixture.getCellName();
|
String cellIdValue = fixture.getCellName();
|
||||||
assertNotNull(cellIdValue);
|
assertNotNull(cellIdValue);
|
||||||
assertEquals(cellIdValue, cellId);
|
assertEquals(cellIdValue, cellId);
|
||||||
|
|||||||
@ -54,20 +54,20 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStringConstructor() {
|
void testStringConstructor() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
|
fixture = new ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
|
||||||
|
|
||||||
assertNotNull(fixture);
|
assertNotNull(fixture);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLoadNotExistingFile() {
|
void testLoadNotExistingFile() {
|
||||||
BuildException e = assertThrows(BuildException.class, () -> new ExcelAntWorkbookUtilTestHelper("notexistingFile"));
|
BuildException e = assertThrows(BuildException.class, () -> new ExcelAntWorkbookUtilTestHelper("notexistingFile"));
|
||||||
assertTrue(e.getMessage().contains("notexistingFile"));
|
assertTrue(e.getMessage().contains("notexistingFile"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWorkbookConstructor() throws IOException {
|
void testWorkbookConstructor() throws IOException {
|
||||||
File workbookFile = new File(mortgageCalculatorFileName);
|
File workbookFile = new File(mortgageCalculatorFileName);
|
||||||
FileInputStream fis = new FileInputStream(workbookFile);
|
FileInputStream fis = new FileInputStream(workbookFile);
|
||||||
Workbook workbook = WorkbookFactory.create(fis);
|
Workbook workbook = WorkbookFactory.create(fis);
|
||||||
@ -78,7 +78,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddFunction() {
|
void testAddFunction() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddFunctionClassName() throws Exception {
|
void testAddFunctionClassName() throws Exception {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddFunctionInvalidClassName() throws Exception {
|
void testAddFunctionInvalidClassName() throws Exception {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetWorkbook() {
|
void testGetWorkbook() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFileName() {
|
void testFileName() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetEvaluator() {
|
void testGetEvaluator() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetEvaluatorWithUDF() {
|
void testGetEvaluatorWithUDF() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetEvaluatorXLSX() {
|
void testGetEvaluatorXLSX() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
TestBuildFile.getDataDir() + "/spreadsheet/sample.xlsx");
|
TestBuildFile.getDataDir() + "/spreadsheet/sample.xlsx");
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetEvaluatorXLSXWithFunction() {
|
void testGetEvaluatorXLSXWithFunction() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
TestBuildFile.getDataDir() + "/spreadsheet/sample.xlsx");
|
TestBuildFile.getDataDir() + "/spreadsheet/sample.xlsx");
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEvaluateCell() {
|
void testEvaluateCell() {
|
||||||
String cell = "'MortgageCalculator'!B4" ;
|
String cell = "'MortgageCalculator'!B4" ;
|
||||||
double expectedValue = 790.79 ;
|
double expectedValue = 790.79 ;
|
||||||
double precision = 0.1 ;
|
double precision = 0.1 ;
|
||||||
@ -221,7 +221,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEvaluateCellFailedPrecision() {
|
void testEvaluateCellFailedPrecision() {
|
||||||
String cell = "'MortgageCalculator'!B4" ;
|
String cell = "'MortgageCalculator'!B4" ;
|
||||||
double expectedValue = 790.79 ;
|
double expectedValue = 790.79 ;
|
||||||
double precision = 0.0000000000001 ;
|
double precision = 0.0000000000001 ;
|
||||||
@ -244,7 +244,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEvaluateCellWithError() {
|
void testEvaluateCellWithError() {
|
||||||
String cell = "'ErrorCell'!A1" ;
|
String cell = "'ErrorCell'!A1" ;
|
||||||
double expectedValue = 790.79 ;
|
double expectedValue = 790.79 ;
|
||||||
double precision = 0.1 ;
|
double precision = 0.1 ;
|
||||||
@ -267,7 +267,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetSheets() {
|
void testGetSheets() {
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
mortgageCalculatorFileName);
|
mortgageCalculatorFileName);
|
||||||
|
|
||||||
@ -278,7 +278,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetString() {
|
void testSetString() {
|
||||||
String cell = "'MortgageCalculator'!C14" ;
|
String cell = "'MortgageCalculator'!C14" ;
|
||||||
String cellValue = "testString" ;
|
String cellValue = "testString" ;
|
||||||
|
|
||||||
@ -294,7 +294,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetNotExistingSheet() {
|
void testSetNotExistingSheet() {
|
||||||
String cell = "'NotexistingSheet'!C14" ;
|
String cell = "'NotexistingSheet'!C14" ;
|
||||||
|
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
|
fixture = new ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
|
||||||
@ -303,7 +303,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetFormula() {
|
void testSetFormula() {
|
||||||
String cell = "'MortgageCalculator'!C14" ;
|
String cell = "'MortgageCalculator'!C14" ;
|
||||||
String cellValue = "SUM(B14:B18)" ;
|
String cellValue = "SUM(B14:B18)" ;
|
||||||
|
|
||||||
@ -318,7 +318,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetDoubleValue() {
|
void testSetDoubleValue() {
|
||||||
String cell = "'MortgageCalculator'!C14" ;
|
String cell = "'MortgageCalculator'!C14" ;
|
||||||
double cellValue = 1.2;
|
double cellValue = 1.2;
|
||||||
|
|
||||||
@ -333,7 +333,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSetDate() {
|
void testSetDate() {
|
||||||
String cell = "'MortgageCalculator'!C14" ;
|
String cell = "'MortgageCalculator'!C14" ;
|
||||||
Date cellValue = new Date();
|
Date cellValue = new Date();
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetNonexistingString() {
|
void testGetNonexistingString() {
|
||||||
String cell = "'MortgageCalculator'!C33" ;
|
String cell = "'MortgageCalculator'!C33" ;
|
||||||
|
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
@ -360,7 +360,7 @@ public class TestExcelAntWorkbookUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetNonexistingDouble() {
|
void testGetNonexistingDouble() {
|
||||||
String cell = "'MortgageCalculator'!C33" ;
|
String cell = "'MortgageCalculator'!C33" ;
|
||||||
|
|
||||||
fixture = new ExcelAntWorkbookUtilTestHelper(
|
fixture = new ExcelAntWorkbookUtilTestHelper(
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class TestExcelAntWorkbookUtilFactory {
|
|||||||
* instance of the ExcelAntWorkbookUtil class.
|
* instance of the ExcelAntWorkbookUtil class.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGetNewWorkbookUtilInstance() {
|
void testGetNewWorkbookUtilInstance() {
|
||||||
ExcelAntWorkbookUtil util = ExcelAntWorkbookUtilFactory.getInstance(
|
ExcelAntWorkbookUtil util = ExcelAntWorkbookUtilFactory.getInstance(
|
||||||
mortgageCalculatorWorkbookFile) ;
|
mortgageCalculatorWorkbookFile) ;
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ public class TestExcelAntWorkbookUtilFactory {
|
|||||||
* the same resource, are passed in.
|
* the same resource, are passed in.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testVerifyEquivalence() {
|
void testVerifyEquivalence() {
|
||||||
String sameFileName = TestBuildFile.getDataDir() + "/spreadsheet/mortgage-calculation.xls" ;
|
String sameFileName = TestBuildFile.getDataDir() + "/spreadsheet/mortgage-calculation.xls" ;
|
||||||
|
|
||||||
ExcelAntWorkbookUtil util = ExcelAntWorkbookUtilFactory.getInstance(
|
ExcelAntWorkbookUtil util = ExcelAntWorkbookUtilFactory.getInstance(
|
||||||
|
|||||||
Binary file not shown.
@ -29,4 +29,6 @@ module org.apache.poi.excelant {
|
|||||||
// test specific exports
|
// test specific exports
|
||||||
requires org.junit.jupiter.api;
|
requires org.junit.jupiter.api;
|
||||||
requires org.junit.jupiter.params;
|
requires org.junit.jupiter.params;
|
||||||
|
|
||||||
|
opens org.apache.poi.ss.excelant.util to org.junit.platform.commons;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user