Author: kiwiwings
Date: Sat Jan  9 15:35:07 2021
New Revision: 1885300

URL: http://svn.apache.org/viewvc?rev=1885300&view=rev
Log:
Sonar fixes
JUnit5 test classes and methods should have default package visibility

Modified:
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java
    
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java
    poi/trunk/src/multimodule/excelant/test9/module-info.class
    poi/trunk/src/multimodule/excelant/test9/module-info.java

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java 
(original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java 
Sat Jan  9 15:35:07 2021
@@ -272,33 +272,33 @@ public class TestBuildFile {
     }
 
     @Test
-    public void testMissingFilename() {
+    void testMissingFilename() {
         expectSpecificBuildException("test-nofile", "required argument not 
specified",
                                      "fileName attribute must be set!");
     }
 
     @Test
-    public void testFileNotFound() {
+    void testFileNotFound() {
         expectSpecificBuildException("test-filenotfound", "required argument 
not specified",
                                      "Cannot load file invalid.xls. Make sure 
the path and file permissions are correct.");
     }
 
     @Test
-    public void testEvaluate() {
+    void testEvaluate() {
         executeTarget("test-evaluate");
         assertLogContaining("Using input file: " + TestBuildFile.getDataDir() 
+ "/spreadsheet/excelant.xls");
         assertLogContaining("Succeeded when evaluating 
'MortgageCalculator'!$B$4.");
     }
 
     @Test
-    public void testEvaluateNoDetails() {
+    void testEvaluateNoDetails() {
         executeTarget("test-evaluate-nodetails");
         assertLogContaining("Using input file: " + TestBuildFile.getDataDir() 
+ "/spreadsheet/excelant.xls");
         assertLogNotContaining("Succeeded when evaluating 
'MortgageCalculator'!$B$4.");
     }
 
     @Test
-    public void testPrecision() {
+    void testPrecision() {
         executeTarget("test-precision");
 
         assertLogContaining("Using input file: " + TestBuildFile.getDataDir() 
+ "/spreadsheet/excelant.xls");
@@ -312,46 +312,46 @@ public class TestBuildFile {
     }
 
     @Test
-    public void testPrecisionFail() {
+    void testPrecisionFail() {
         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.");
     }
 
     @Test
-    public void testPassOnError() {
+    void testPassOnError() {
         executeTarget("test-passonerror");
         assertLogContaining("Using input file: " + TestBuildFile.getDataDir() 
+ "/spreadsheet/excelant.xls");
         assertLogContaining("Test named failonerror failed because 1 of 0 
evaluations failed to evaluate correctly.");
     }
 
     @Test
-    public void testFailOnError() {
+    void testFailOnError() {
         expectBuildException("test-failonerror", "fail on error");
         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");
     }
 
     @Test
-    public void testFailOnErrorNoDetails() {
+    void testFailOnErrorNoDetails() {
         expectBuildException("test-failonerror-nodetails", "fail on error");
         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");
     }
 
     @Test
-    public void testUdf() {
+    void testUdf() {
         executeTarget("test-udf");
         assertLogContaining("1/1 tests passed");
     }
 
     @Test
-    public void testSetText() {
+    void testSetText() {
         executeTarget("test-settext");
         assertLogContaining("1/1 tests passed");
     }
 
     @Test
-    public void testAddHandler() {
+    void testAddHandler() {
         executeTarget("test-addhandler");
         assertLogContaining("Using input file: " + TestBuildFile.getDataDir() 
+ "/spreadsheet/excelant.xls");
         assertLogContaining("Succeeded when evaluating 
'MortgageCalculator'!$B$4.");
@@ -361,14 +361,14 @@ public class TestBuildFile {
     }
 
     @Test
-    public void testAddHandlerWrongClass() {
+    void testAddHandlerWrongClass() {
         executeTarget("test-addhandler-wrongclass");
         assertLogContaining("Using input file: " + TestBuildFile.getDataDir() 
+ "/spreadsheet/excelant.xls");
         assertLogContaining("Succeeded when evaluating 
'MortgageCalculator'!$B$4.");
     }
 
     @Test
-    public void testAddHandlerFails() {
+    void testAddHandlerFails() {
         expectSpecificBuildException("test-addhandler-fails", 
"NullPointException", null);
     }
 

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java
 (original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java
 Sat Jan  9 15:35:07 2021
@@ -38,7 +38,7 @@ public class TestExcelAntPrecision {
        }
 
        @Test
-       public void testVerifyPrecision() {
+       void testVerifyPrecision() {
 
                double value = 1.0E-1 ;
 

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java
 (original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java
 Sat Jan  9 15:35:07 2021
@@ -46,7 +46,7 @@ public class TestExcelAntSet {
        }
 
        @Test
-       public void testSetter() {
+       void testSetter() {
                String cell = "simpleCellRef!$F$1" ;
 
                fixture.setCell( cell ) ;
@@ -58,7 +58,7 @@ public class TestExcelAntSet {
        }
 
        @Test
-       public void testSetWorkbookUtil() {
+       void testSetWorkbookUtil() {
                ExcelAntWorkbookUtil util = 
ExcelAntWorkbookUtilFactory.getInstance(
                                                                 
mortgageCalculatorFileName ) ;
 

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java
 (original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java
 Sat Jan  9 15:35:07 2021
@@ -47,7 +47,7 @@ public class TestExcelAntSetDoubleCell {
        }
 
        @Test
-       public void testSetDouble() {
+       void testSetDouble() {
                String cellId = "'Sheet3'!$A$1" ;
                double testValue = 1.1 ;
 

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java
 (original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java
 Sat Jan  9 15:35:07 2021
@@ -32,7 +32,7 @@ public class TestExcelAntUserDefinedFunc
        }
 
        @Test
-       public void testSetClassName() {
+       void testSetClassName() {
                String className = "simple.class.name" ;
 
                fixture.setClassName( className ) ;
@@ -43,7 +43,7 @@ public class TestExcelAntUserDefinedFunc
        }
 
        @Test
-       public void testSetFunction() {
+       void testSetFunction() {
                String functionAlias = "alias" ;
 
                fixture.setFunctionAlias( functionAlias ) ;

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java
 (original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java
 Sat Jan  9 15:35:07 2021
@@ -49,26 +49,26 @@ public class TestExcelAntEvaluationResul
        }
 
     @Test
-       public void testCompletedWithErrorMessage() {
+       void testCompletedWithErrorMessage() {
                String errMsg = fixture.getErrorMessage();
                assertNotNull(errMsg);
                assertEquals(errMsg, errMessage);
        }
 
     @Test
-       public void testPassed() {
+       void testPassed() {
                boolean passedValue = fixture.didTestPass();
                assertEquals(passedValue, passed);
        }
 
     @Test
-       public void testDelta() {
+       void testDelta() {
                double deltaValue = fixture.getDelta();
                assertEquals(deltaValue, delta, 0.0);
        }
 
     @Test
-       public void testCellId() {
+       void testCellId() {
                String cellIdValue = fixture.getCellName();
                assertNotNull(cellIdValue);
                assertEquals(cellIdValue, cellId);

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java
 (original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java
 Sat Jan  9 15:35:07 2021
@@ -54,20 +54,20 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-       public void testStringConstructor() {
+       void testStringConstructor() {
                fixture = new 
ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
 
                assertNotNull(fixture);
        }
 
        @Test
-       public void testLoadNotExistingFile() {
+       void testLoadNotExistingFile() {
                BuildException e = assertThrows(BuildException.class, () -> new 
ExcelAntWorkbookUtilTestHelper("notexistingFile"));
                assertTrue(e.getMessage().contains("notexistingFile"));
        }
 
        @Test
-       public void testWorkbookConstructor() throws IOException {
+       void testWorkbookConstructor() throws IOException {
         File workbookFile = new File(mortgageCalculatorFileName);
         FileInputStream fis = new FileInputStream(workbookFile);
         Workbook workbook = WorkbookFactory.create(fis);
@@ -78,7 +78,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-       public void testAddFunction() {
+       void testAddFunction() {
                fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -93,7 +93,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-    public void testAddFunctionClassName() throws Exception {
+    void testAddFunctionClassName() throws Exception {
         fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -108,7 +108,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-    public void testAddFunctionInvalidClassName() throws Exception {
+    void testAddFunctionInvalidClassName() throws Exception {
         fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -123,7 +123,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-       public void testGetWorkbook() {
+       void testGetWorkbook() {
                fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -135,7 +135,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-       public void testFileName() {
+       void testFileName() {
                fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -150,7 +150,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-       public void testGetEvaluator() {
+       void testGetEvaluator() {
                fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -161,7 +161,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-    public void testGetEvaluatorWithUDF() {
+    void testGetEvaluatorWithUDF() {
         fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -174,7 +174,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-       public void testGetEvaluatorXLSX() {
+       void testGetEvaluatorXLSX() {
                fixture = new ExcelAntWorkbookUtilTestHelper(
                 TestBuildFile.getDataDir() + "/spreadsheet/sample.xlsx");
 
@@ -185,7 +185,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-    public void testGetEvaluatorXLSXWithFunction() {
+    void testGetEvaluatorXLSXWithFunction() {
         fixture = new ExcelAntWorkbookUtilTestHelper(
                 TestBuildFile.getDataDir() + "/spreadsheet/sample.xlsx");
 
@@ -198,7 +198,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-       public void testEvaluateCell() {
+       void testEvaluateCell() {
                String cell = "'MortgageCalculator'!B4" ;
                double expectedValue = 790.79 ;
                double precision = 0.1 ;
@@ -221,7 +221,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-    public void testEvaluateCellFailedPrecision() {
+    void testEvaluateCellFailedPrecision() {
         String cell = "'MortgageCalculator'!B4" ;
         double expectedValue = 790.79 ;
         double precision = 0.0000000000001 ;
@@ -244,7 +244,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-    public void testEvaluateCellWithError() {
+    void testEvaluateCellWithError() {
         String cell = "'ErrorCell'!A1" ;
         double expectedValue = 790.79 ;
         double precision = 0.1 ;
@@ -267,7 +267,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-       public void testGetSheets() {
+       void testGetSheets() {
                fixture = new ExcelAntWorkbookUtilTestHelper(
                 mortgageCalculatorFileName);
 
@@ -278,7 +278,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-       public void testSetString() {
+       void testSetString() {
                String cell = "'MortgageCalculator'!C14" ;
                String cellValue = "testString" ;
 
@@ -294,7 +294,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-    public void testSetNotExistingSheet() {
+    void testSetNotExistingSheet() {
         String cell = "'NotexistingSheet'!C14" ;
 
         fixture = new 
ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
@@ -303,7 +303,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-    public void testSetFormula() {
+    void testSetFormula() {
         String cell = "'MortgageCalculator'!C14" ;
         String cellValue = "SUM(B14:B18)" ;
 
@@ -318,7 +318,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-    public void testSetDoubleValue() {
+    void testSetDoubleValue() {
         String cell = "'MortgageCalculator'!C14" ;
         double cellValue = 1.2;
 
@@ -333,7 +333,7 @@ public class TestExcelAntWorkbookUtil {
     }
 
        @Test
-       public void testSetDate() {
+       void testSetDate() {
                String cell = "'MortgageCalculator'!C14" ;
                Date cellValue = new Date();
 
@@ -348,7 +348,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-       public void testGetNonexistingString() {
+       void testGetNonexistingString() {
                String cell = "'MortgageCalculator'!C33" ;
 
                fixture = new ExcelAntWorkbookUtilTestHelper(
@@ -360,7 +360,7 @@ public class TestExcelAntWorkbookUtil {
        }
 
        @Test
-       public void testGetNonexistingDouble() {
+       void testGetNonexistingDouble() {
                String cell = "'MortgageCalculator'!C33" ;
 
                fixture = new ExcelAntWorkbookUtilTestHelper(

Modified: 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java
 (original)
+++ 
poi/trunk/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java
 Sat Jan  9 15:35:07 2021
@@ -37,7 +37,7 @@ public class TestExcelAntWorkbookUtilFac
         * instance of the ExcelAntWorkbookUtil class.
         */
     @Test
-       public void testGetNewWorkbookUtilInstance() {
+       void testGetNewWorkbookUtilInstance() {
                ExcelAntWorkbookUtil util = 
ExcelAntWorkbookUtilFactory.getInstance(
                                                              
mortgageCalculatorWorkbookFile) ;
 
@@ -51,7 +51,7 @@ public class TestExcelAntWorkbookUtilFac
         * the same resource, are passed in.
         */
     @Test
-       public void testVerifyEquivalence() {
+       void testVerifyEquivalence() {
                String sameFileName = TestBuildFile.getDataDir() + 
"/spreadsheet/mortgage-calculation.xls" ;
 
                ExcelAntWorkbookUtil util = 
ExcelAntWorkbookUtilFactory.getInstance(

Modified: poi/trunk/src/multimodule/excelant/test9/module-info.class
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/multimodule/excelant/test9/module-info.class?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
Binary files - no diff available.

Modified: poi/trunk/src/multimodule/excelant/test9/module-info.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/multimodule/excelant/test9/module-info.java?rev=1885300&r1=1885299&r2=1885300&view=diff
==============================================================================
--- poi/trunk/src/multimodule/excelant/test9/module-info.java (original)
+++ poi/trunk/src/multimodule/excelant/test9/module-info.java Sat Jan  9 
15:35:07 2021
@@ -29,4 +29,6 @@ module org.apache.poi.excelant {
     // test specific exports
     requires org.junit.jupiter.api;
     requires org.junit.jupiter.params;
+
+    opens org.apache.poi.ss.excelant.util to org.junit.platform.commons;
 }
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org

Reply via email to