aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2021-01-10 21:16:04 +0000
committerAndreas Beeker <kiwiwings@apache.org>2021-01-10 21:16:04 +0000
commit1041a876cb2bbd6f6349986645018160be0ba6e2 (patch)
treee4c612432f58ba583a028ae1cca40d3a630e860b /src/scratchpad
parentcc7cd1caf32e631fc89d8cbd6570f9f57fbed826 (diff)
downloadpoi-1041a876cb2bbd6f6349986645018160be0ba6e2.tar.gz
poi-1041a876cb2bbd6f6349986645018160be0ba6e2.zip
Sonar fixes
JUnit5 test classes and methods should have default package visibility git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885340 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/BaseTestPPTIterating.java (renamed from src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java9
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java9
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java11
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java11
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java3
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java9
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java9
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestAbstractWordUtils.java (renamed from src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlfLfo.java (renamed from src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLFOLVLBaseAbstractType.java (renamed from src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java)2
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLVLFAbstractType.java (renamed from src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java)2
15 files changed, 35 insertions, 44 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/BaseTestPPTIterating.java
index 24ea8ac966..869b96e4b8 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/BaseTestPPTIterating.java
@@ -42,7 +42,7 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
-public abstract class BasePPTIteratingTest {
+public abstract class BaseTestPPTIterating {
protected static final Set<String> OLD_FILES = new HashSet<>();
static {
OLD_FILES.add("PPT95.ppt");
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java
index 5b135a5e88..206db2b20a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java
@@ -16,16 +16,15 @@
==================================================================== */
package org.apache.poi.hslf.dev;
-import org.apache.poi.EmptyFileException;
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.File;
import java.io.IOException;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.apache.poi.EmptyFileException;
+import org.junit.jupiter.api.Test;
-public class TestPPDrawingTextListing extends BasePPTIteratingTest {
+public class TestPPDrawingTextListing extends BaseTestPPTIterating {
@Test
void testMain() throws IOException {
// calls System.exit(): PPDrawingTextListing.main(new String[0]);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java
index c70b25ec66..c0572750b6 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java
@@ -26,7 +26,7 @@ import org.apache.poi.EmptyFileException;
import org.apache.poi.hslf.HSLFTestDataSamples;
import org.junit.jupiter.api.Test;
-public class TestPPTXMLDump extends BasePPTIteratingTest {
+public class TestPPTXMLDump extends BaseTestPPTIterating {
@Test
void testMain() throws Exception {
PPTXMLDump.main(new String[0]);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java
index 3dc19422f2..8ee2010fa7 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java
@@ -17,7 +17,6 @@
package org.apache.poi.hslf.dev;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
import java.io.File;
import java.io.IOException;
@@ -29,7 +28,7 @@ import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
-public class TestSLWTListing extends BasePPTIteratingTest {
+public class TestSLWTListing extends BaseTestPPTIterating {
private static PrintStream oldStdErr;
@BeforeAll
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java
index ced2727094..c61dd00b24 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java
@@ -16,16 +16,15 @@
==================================================================== */
package org.apache.poi.hslf.dev;
-import org.apache.poi.EmptyFileException;
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.File;
import java.io.IOException;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.apache.poi.EmptyFileException;
+import org.junit.jupiter.api.Test;
-public class TestSLWTTextListing extends BasePPTIteratingTest {
+public class TestSLWTTextListing extends BaseTestPPTIterating {
@Test
void testMain() throws IOException {
// calls System.exit(): SLWTTextListing.main(new String[0]);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java
index cec26a035a..ea37f7d159 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java
@@ -16,17 +16,16 @@
==================================================================== */
package org.apache.poi.hslf.dev;
-import org.apache.poi.EmptyFileException;
-import org.apache.poi.hslf.HSLFTestDataSamples;
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.File;
import java.io.IOException;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.apache.poi.EmptyFileException;
+import org.apache.poi.hslf.HSLFTestDataSamples;
+import org.junit.jupiter.api.Test;
-public class TestSlideAndNotesAtomListing extends BasePPTIteratingTest {
+public class TestSlideAndNotesAtomListing extends BaseTestPPTIterating {
@Test
void testMain() throws IOException {
// calls System.exit(): SlideAndNotesAtomListing.main(new String[0]);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java
index 528b694886..b75bec5178 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java
@@ -16,17 +16,16 @@
==================================================================== */
package org.apache.poi.hslf.dev;
-import org.apache.poi.EmptyFileException;
-import org.apache.poi.hslf.HSLFTestDataSamples;
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.File;
import java.io.IOException;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.apache.poi.EmptyFileException;
+import org.apache.poi.hslf.HSLFTestDataSamples;
+import org.junit.jupiter.api.Test;
-public class TestSlideIdListing extends BasePPTIteratingTest {
+public class TestSlideIdListing extends BaseTestPPTIterating {
@Test
void testMain() throws IOException {
// calls System.exit(): SlideIdListing.main(new String[0]);
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java
index d39cbdcfc1..51b9ee5d69 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java
@@ -17,7 +17,6 @@
package org.apache.poi.hslf.dev;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
import java.io.File;
import java.io.FileNotFoundException;
@@ -31,7 +30,7 @@ import org.apache.poi.hslf.HSLFTestDataSamples;
import org.apache.poi.util.IOUtils;
import org.junit.jupiter.api.Test;
-public class TestSlideShowDumper extends BasePPTIteratingTest {
+public class TestSlideShowDumper extends BaseTestPPTIterating {
private static final Set<String> FAILING = new HashSet<>();
static {
FAILING.add("cryptoapi-proc2356.ppt");
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java
index 8d24389302..4392ec603a 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java
@@ -17,7 +17,6 @@
package org.apache.poi.hslf.dev;
import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
import java.io.File;
import java.io.IOException;
@@ -26,7 +25,7 @@ import org.apache.poi.EmptyFileException;
import org.apache.poi.hslf.HSLFTestDataSamples;
import org.junit.jupiter.api.Test;
-public class TestSlideShowRecordDumper extends BasePPTIteratingTest {
+public class TestSlideShowRecordDumper extends BaseTestPPTIterating {
@Test
void testMain() throws IOException {
SlideShowRecordDumper.main(new String[] {
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java
index d5c4892e18..5a5d826ef1 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java
@@ -16,18 +16,17 @@
==================================================================== */
package org.apache.poi.hslf.dev;
-import org.apache.poi.EmptyFileException;
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.File;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.apache.poi.EmptyFileException;
+import org.junit.jupiter.api.Test;
-public class TestTextStyleListing extends BasePPTIteratingTest {
+public class TestTextStyleListing extends BaseTestPPTIterating {
private static Set<String> FAILING = new HashSet<>();
static {
FAILING.add("empty_textbox.ppt");
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java
index cfa2575e50..c284ce1ba3 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java
@@ -16,16 +16,15 @@
==================================================================== */
package org.apache.poi.hslf.dev;
-import org.apache.poi.EmptyFileException;
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.File;
import java.io.IOException;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.apache.poi.EmptyFileException;
+import org.junit.jupiter.api.Test;
-public class TestUserEditAndPersistListing extends BasePPTIteratingTest {
+public class TestUserEditAndPersistListing extends BaseTestPPTIterating {
@Test
void testMain() throws IOException {
// calls System.exit(): UserEditAndPersistListing.main(new String[0]);
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestAbstractWordUtils.java
index 840e90264f..f666517e51 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestAbstractWordUtils.java
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
/**
* Test cases for {@link AbstractWordUtils}
*/
-public class AbstractWordUtilsTest {
+public class TestAbstractWordUtils {
/**
* Test case for {@link AbstractWordUtils#buildTableCellEdgesArray(Table)}
*/
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlfLfo.java
index c1ae598fb0..a18902ad8d 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlfLfo.java
@@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.Test;
-public class PlfLfoTest {
+public class TestPlfLfo {
@Test
void testAdd() {
PlfLfo p = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0);
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLFOLVLBaseAbstractType.java
index 3cae7ce951..aa986a558f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLFOLVLBaseAbstractType.java
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
/**
* Test cases for {@link LFOLVLBaseAbstractType}
*/
-public class LFOLVLBaseAbstractTypeTest {
+class TestLFOLVLBaseAbstractType {
@Test
void testGetSize() {
assertEquals( 8, LFOLVLBaseAbstractType.getSize() );
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLVLFAbstractType.java
index 2f3d1d90a5..d48fa9e4f5 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLVLFAbstractType.java
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
/**
* Test cases for {@link LVLFAbstractType}
*/
-public class LVLFAbstractTypeTest {
+class TestLVLFAbstractType {
@Test
void testGetSize() {
assertEquals( 28, LVLFAbstractType.getSize() );