From 2457ece51eb74352a9c7ff4dc45444d7def9d6ef Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Sat, 9 Jan 2021 20:25:15 +0000 Subject: [PATCH] Sonar fixes JUnit5 test classes and methods should have default package visibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885319 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/ss/excelant/TestBuildFile.java | 14 +++++++------- .../poi/ss/excelant/TestExcelAntPrecision.java | 4 ++-- .../apache/poi/ss/excelant/TestExcelAntSet.java | 4 ++-- .../poi/ss/excelant/TestExcelAntSetDoubleCell.java | 4 ++-- .../excelant/TestExcelAntUserDefinedFunction.java | 2 +- .../util/TestExcelAntEvaluationResult.java | 4 ++-- .../ss/excelant/util/TestExcelAntWorkbookUtil.java | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java b/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java index 4c84ead1df..89e948aaa4 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/TestBuildFile.java @@ -50,7 +50,7 @@ public class TestBuildFile { @BeforeEach - public void setUp() { + void setUp() { String filename = TestBuildFile.getDataDir() + "/../src/excelant/testcases/org/apache/poi/ss/excelant/tests.xml"; int logLevel = Project.MSG_DEBUG; @@ -76,7 +76,7 @@ public class TestBuildFile { * test target depend on it. */ @AfterEach - public void tearDown() { + void tearDown() { if (project == null) { /* * Maybe the BuildFileTest was subclassed and there is @@ -100,21 +100,21 @@ public class TestBuildFile { * @param target target to run * @param cause information string to reader of report */ - public void expectBuildException(String target, String cause) { + void expectBuildException(String target, String cause) { expectSpecificBuildException(target, cause, null); } /** * Assert that the given substring is in the log messages. */ - public void assertLogContaining(String substring) { + void assertLogContaining(String substring) { assertContains(getLog(), substring); } /** * Assert that the given substring is not in the log messages. */ - public void assertLogNotContaining(String substring) { + void assertLogNotContaining(String substring) { assertNotContained(getLog(), substring); } @@ -133,7 +133,7 @@ public class TestBuildFile { * * @param targetName target to run */ - public void executeTarget(String targetName) { + void executeTarget(String targetName) { PrintStream sysOut = System.out; PrintStream sysErr = System.err; try { @@ -159,7 +159,7 @@ public class TestBuildFile { * @param msg the message value of the build exception we are waiting * for set to null for any build exception to be valid */ - public void expectSpecificBuildException(String target, String cause, String msg) { + void expectSpecificBuildException(String target, String cause, String msg) { try { executeTarget(target); } catch (org.apache.tools.ant.BuildException ex) { diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java index aaa9953fd6..e67ef0976d 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java @@ -28,12 +28,12 @@ public class TestExcelAntPrecision { private ExcelAntPrecision fixture ; @BeforeEach - public void setUp() { + void setUp() { fixture = new ExcelAntPrecision() ; } @AfterEach - public void tearDown() { + void tearDown() { fixture = null ; } diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java index fc9aef1932..eb7c0cac67 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java @@ -36,12 +36,12 @@ public class TestExcelAntSet { TestBuildFile.getDataDir() + "/spreadsheet/mortgage-calculation.xls" ; @BeforeEach - public void setUp() { + void setUp() { fixture = new ExcelAntSetDoubleCell() ; } @AfterEach - public void tearDown() { + void tearDown() { fixture = null ; } diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java index 437994c5a7..c2e246319c 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java @@ -35,14 +35,14 @@ public class TestExcelAntSetDoubleCell { TestBuildFile.getDataDir() + "/spreadsheet/mortgage-calculation.xls" ; @BeforeEach - public void setUp() { + void setUp() { fixture = new ExcelAntSetDoubleCell() ; util = ExcelAntWorkbookUtilFactory.getInstance(mortgageCalculatorFileName ) ; fixture.setWorkbookUtil( util ) ; } @AfterEach - public void tearDown() { + void tearDown() { fixture = null ; } diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java index 67521ed562..c8df0a55aa 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java @@ -27,7 +27,7 @@ public class TestExcelAntUserDefinedFunction { private ExcelAntUserDefinedFunctionTestHelper fixture ; @BeforeEach - public void setUp() { + void setUp() { fixture = new ExcelAntUserDefinedFunctionTestHelper() ; } diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java b/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java index 767a37f7d6..aea7208ea1 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java @@ -34,7 +34,7 @@ public class TestExcelAntEvaluationResult { private String cellId = "testCell!$F$1"; @BeforeEach - public void setUp() { + void setUp() { fixture = new ExcelAntEvaluationResult(completedWithError, passed, retValue, @@ -44,7 +44,7 @@ public class TestExcelAntEvaluationResult { } @AfterEach - public void tearDown() { + void tearDown() { fixture = null; } diff --git a/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java b/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java index 178d3e7751..8d6fb45990 100644 --- a/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java +++ b/src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java @@ -49,7 +49,7 @@ public class TestExcelAntWorkbookUtil { @AfterEach - public void tearDown() { + void tearDown() { fixture = null ; } -- 2.39.5