Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/XSSFCellBorderTest.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/XSSFCellBorderTest.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/XSSFCellBorderTest.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/extensions/XSSFCellBorderTest.java Sat Jan 9 00:46:52 2021 @@ -46,7 +46,7 @@ public class XSSFCellBorderTest { } @Test - public void testEquals() { + void testEquals() { for (XSSFCellBorder.BorderSide side : XSSFCellBorder.BorderSide.values()) { XSSFCellBorder border = new XSSFCellBorder(); assertEquals(empty, border); @@ -78,7 +78,7 @@ public class XSSFCellBorderTest { } @Test - public void testConstruct() { + void testConstruct() { XSSFCellBorder border = new XSSFCellBorder((CTBorder) empty.getCTBorder().copy()); assertEquals(empty, border); border.getCTBorder().setOutline(true); @@ -97,7 +97,7 @@ public class XSSFCellBorderTest { } @Test - public void testGettersSetters() { + void testGettersSetters() { assertNotNull(empty.getCTBorder()); XSSFCellBorder border = new XSSFCellBorder((CTBorder) empty.getCTBorder().copy()); @@ -106,7 +106,7 @@ public class XSSFCellBorderTest { } @Test - public void testSetBorderStyle() { + void testSetBorderStyle() { XSSFCellBorder border = new XSSFCellBorder(); for (XSSFCellBorder.BorderSide side : XSSFCellBorder.BorderSide.values()) { assertEquals(BorderStyle.NONE, border.getBorderStyle(side)); @@ -117,7 +117,7 @@ public class XSSFCellBorderTest { } @Test - public void testSetBorderColor() { + void testSetBorderColor() { XSSFCellBorder border = new XSSFCellBorder(); XSSFColor color = new XSSFColor(stylesSource.getIndexedColors()); @@ -130,7 +130,7 @@ public class XSSFCellBorderTest { } @Test - public void testRegression() throws Exception { + void testRegression() throws Exception { XSSFCellStyle style = wb.createCellStyle(); style.setBorderTop(BorderStyle.THICK); style.setBorderBottom(BorderStyle.THICK);
Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestColumnHelper.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestColumnHelper.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestColumnHelper.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestColumnHelper.java Sat Jan 9 00:46:52 2021 @@ -45,7 +45,7 @@ import org.openxmlformats.schemas.spread public final class TestColumnHelper { @Test - public void testCleanColumns() { + void testCleanColumns() { CTWorksheet worksheet = CTWorksheet.Factory.newInstance(); CTCols cols1 = worksheet.addNewCols(); @@ -79,7 +79,7 @@ public final class TestColumnHelper { } @Test - public void testSortColumns() { + void testSortColumns() { CTCols cols1 = CTCols.Factory.newInstance(); CTCol col1 = cols1.addNewCol(); col1.setMin(1); @@ -125,7 +125,7 @@ public final class TestColumnHelper { } @Test - public void testCloneCol() { + void testCloneCol() { CTWorksheet worksheet = CTWorksheet.Factory.newInstance(); ColumnHelper helper = new ColumnHelper(worksheet); @@ -143,7 +143,7 @@ public final class TestColumnHelper { } @Test - public void testAddCleanColIntoCols() { + void testAddCleanColIntoCols() { CTWorksheet worksheet = CTWorksheet.Factory.newInstance(); ColumnHelper helper = new ColumnHelper(worksheet); @@ -195,14 +195,14 @@ public final class TestColumnHelper { } @Test - public void testAddCleanColIntoColsExactOverlap() { + void testAddCleanColIntoColsExactOverlap() { CTCols cols = createHiddenAndBestFitColsWithHelper(1, 1, 1, 1); assertEquals(1, cols.sizeOfColArray()); assertMinMaxHiddenBestFit(cols, 0, 1, 1, true, true); } @Test - public void testAddCleanColIntoColsOverlapsOverhangingBothSides() { + void testAddCleanColIntoColsOverlapsOverhangingBothSides() { CTCols cols = createHiddenAndBestFitColsWithHelper(2, 2, 1, 3); assertEquals(3, cols.sizeOfColArray()); assertMinMaxHiddenBestFit(cols, 0, 1, 1, false, true); @@ -211,7 +211,7 @@ public final class TestColumnHelper { } @Test - public void testAddCleanColIntoColsOverlapsCompletelyNested() { + void testAddCleanColIntoColsOverlapsCompletelyNested() { CTCols cols = createHiddenAndBestFitColsWithHelper(1, 3, 2, 2); assertEquals(3, cols.sizeOfColArray()); assertMinMaxHiddenBestFit(cols, 0, 1, 1, true, false); @@ -220,7 +220,7 @@ public final class TestColumnHelper { } @Test - public void testAddCleanColIntoColsNewOverlapsOverhangingLeftNotRightExactRight() { + void testAddCleanColIntoColsNewOverlapsOverhangingLeftNotRightExactRight() { CTCols cols = createHiddenAndBestFitColsWithHelper(2, 3, 1, 3); assertEquals(2, cols.sizeOfColArray()); assertMinMaxHiddenBestFit(cols, 0, 1, 1, false, true); @@ -228,7 +228,7 @@ public final class TestColumnHelper { } @Test - public void testAddCleanColIntoColsNewOverlapsOverhangingRightNotLeftExactLeft() { + void testAddCleanColIntoColsNewOverlapsOverhangingRightNotLeftExactLeft() { CTCols cols = createHiddenAndBestFitColsWithHelper(1, 2, 1, 3); assertEquals(2, cols.sizeOfColArray()); assertMinMaxHiddenBestFit(cols, 0, 1, 2, true, true); @@ -236,7 +236,7 @@ public final class TestColumnHelper { } @Test - public void testAddCleanColIntoColsNewOverlapsOverhangingLeftNotRight() { + void testAddCleanColIntoColsNewOverlapsOverhangingLeftNotRight() { CTCols cols = createHiddenAndBestFitColsWithHelper(2, 3, 1, 2); assertEquals(3, cols.sizeOfColArray()); assertMinMaxHiddenBestFit(cols, 0, 1, 1, false, true); @@ -245,7 +245,7 @@ public final class TestColumnHelper { } @Test - public void testAddCleanColIntoColsNewOverlapsOverhangingRightNotLeft() { + void testAddCleanColIntoColsNewOverlapsOverhangingRightNotLeft() { CTCols cols = createHiddenAndBestFitColsWithHelper(1, 2, 2, 3); assertEquals(3, cols.sizeOfColArray()); assertMinMaxHiddenBestFit(cols, 0, 1, 1, true, false); @@ -288,7 +288,7 @@ public final class TestColumnHelper { } @Test - public void testGetColumn() { + void testGetColumn() { CTWorksheet worksheet = CTWorksheet.Factory.newInstance(); CTCols cols1 = worksheet.addNewCols(); @@ -318,7 +318,7 @@ public final class TestColumnHelper { } @Test - public void testSetColumnAttributes() { + void testSetColumnAttributes() { CTCol col = CTCol.Factory.newInstance(); col.setWidth(12); col.setHidden(true); @@ -333,7 +333,7 @@ public final class TestColumnHelper { } @Test - public void testGetOrCreateColumn() throws IOException { + void testGetOrCreateColumn() throws IOException { XSSFWorkbook workbook = new XSSFWorkbook(); XSSFSheet sheet = workbook.createSheet("Sheet 1"); ColumnHelper columnHelper = sheet.getColumnHelper(); @@ -357,7 +357,7 @@ public final class TestColumnHelper { } @Test - public void testGetSetColDefaultStyle() throws IOException { + void testGetSetColDefaultStyle() throws IOException { XSSFWorkbook workbook = new XSSFWorkbook(); XSSFSheet sheet = workbook.createSheet(); CTWorksheet ctWorksheet = sheet.getCTWorksheet(); @@ -408,7 +408,7 @@ public final class TestColumnHelper { @SuppressWarnings("deprecation") @Test - public void testColumnsCollapsed() { + void testColumnsCollapsed() { Workbook wb = new XSSFWorkbook(); Sheet sheet = wb.createSheet("test"); Row row = sheet.createRow(0); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestHeaderFooterHelper.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestHeaderFooterHelper.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestHeaderFooterHelper.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/helpers/TestHeaderFooterHelper.java Sat Jan 9 00:46:52 2021 @@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test; public class TestHeaderFooterHelper { @Test - public void testGetCenterLeftRightSection() { + void testGetCenterLeftRightSection() { HeaderFooterHelper helper = new HeaderFooterHelper(); String headerFooter = "&CTest the center section"; @@ -42,7 +42,7 @@ public class TestHeaderFooterHelper { } @Test - public void testSetCenterLeftRightSection() { + void testSetCenterLeftRightSection() { HeaderFooterHelper helper = new HeaderFooterHelper(); String headerFooter = ""; headerFooter = helper.setCenterSection(headerFooter, "First added center section"); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/MemoryUsage.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/MemoryUsage.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/MemoryUsage.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/MemoryUsage.java Sat Jan 9 00:46:52 2021 @@ -157,7 +157,7 @@ public class MemoryUsage { * @see #testXmlAttached() */ @Test - public void testXmlDetached() { + void testXmlDetached() { System.out.println(); System.out.println("Testing detached"); @@ -186,7 +186,7 @@ public class MemoryUsage { * @see #testXmlAttached() */ @Test - public void testXmlAttached() { + void testXmlAttached() { System.out.println(); System.out.println("Testing attached"); printMemoryUsage("before"); @@ -212,22 +212,22 @@ public class MemoryUsage { } @Test - public void testMixedHSSF() { + void testMixedHSSF() { mixedSpreadsheet(new HSSFWorkbook(), NUM_COLUMNS); } @Test - public void testMixedXSSF() { + void testMixedXSSF() { mixedSpreadsheet(new XSSFWorkbook(), NUM_COLUMNS); } @Test - public void testNumberHSSF() { + void testNumberHSSF() { numberSpreadsheet(new HSSFWorkbook(), NUM_COLUMNS); } @Test - public void testNumberXSSF() { + void testNumberXSSF() { numberSpreadsheet(new XSSFWorkbook(), NUM_COLUMNS); } } \ No newline at end of file Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestCTColComparator.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestCTColComparator.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestCTColComparator.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestCTColComparator.java Sat Jan 9 00:46:52 2021 @@ -28,7 +28,7 @@ import org.openxmlformats.schemas.spread public final class TestCTColComparator { @Test - public void testCompare() { + void testCompare() { CTCol o1 = CTCol.Factory.newInstance(); o1.setMin(1); o1.setMax(10); @@ -46,7 +46,7 @@ public final class TestCTColComparator { } @Test - public void testArraysSort() { + void testArraysSort() { CTCol o1 = CTCol.Factory.newInstance(); o1.setMin(1); o1.setMax(10); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestEvilUnclosedBRFixingInputStream.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestEvilUnclosedBRFixingInputStream.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestEvilUnclosedBRFixingInputStream.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestEvilUnclosedBRFixingInputStream.java Sat Jan 9 00:46:52 2021 @@ -37,7 +37,7 @@ public final class TestEvilUnclosedBRFix } @Test - public void testOK() throws IOException { + void testOK() throws IOException { byte[] ok = getBytes("<p><div>Hello There!</div> <div>Tags!</div></p>"); EvilUnclosedBRFixingInputStream inp = new EvilUnclosedBRFixingInputStream(ok); @@ -47,7 +47,7 @@ public final class TestEvilUnclosedBRFix } @Test - public void testProblem() throws IOException { + void testProblem() throws IOException { byte[] orig = getBytes("<p><div>Hello<br>There!</div> <div>Tags!</div></p>"); byte[] fixed = getBytes("<p><div>Hello<br/>There!</div> <div>Tags!</div></p>"); @@ -61,7 +61,7 @@ public final class TestEvilUnclosedBRFix * Checks that we can copy with br tags around the buffer boundaries */ @Test - public void testBufferSize() throws IOException { + void testBufferSize() throws IOException { byte[] orig = getBytes("<p><div>Hello<br> <br>There!</div> <div>Tags!<br><br></div></p>"); byte[] fixed = getBytes("<p><div>Hello<br/> <br/>There!</div> <div>Tags!<br/><br/></div></p>"); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestNumericRanges.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestNumericRanges.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestNumericRanges.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/util/TestNumericRanges.java Sat Jan 9 00:46:52 2021 @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; public class TestNumericRanges { @Test - public void testGetOverlappingType() { + void testGetOverlappingType() { long[] r1 = {3, 8}; long[] r2 = {6, 11}; long[] r3 = {1, 5}; @@ -40,7 +40,7 @@ public class TestNumericRanges { } @Test - public void testGetOverlappingRange() { + void testGetOverlappingRange() { long[] r1 = {3, 8}; long[] r2 = {6, 11}; long[] r3 = {1, 5}; Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestAllExtendedProperties.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestAllExtendedProperties.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestAllExtendedProperties.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestAllExtendedProperties.java Sat Jan 9 00:46:52 2021 @@ -48,7 +48,7 @@ import org.openxmlformats.schemas.office */ public final class TestAllExtendedProperties { @Test - public void testGetAllExtendedProperties() throws IOException { + void testGetAllExtendedProperties() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("TestPoiXMLDocumentCorePropertiesGetKeywords.docx")) { CTProperties ctProps = doc.getProperties().getExtendedProperties().getUnderlyingProperties(); assertEquals("Microsoft Office Word", ctProps.getApplication()); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestDocumentProtection.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestDocumentProtection.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestDocumentProtection.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestDocumentProtection.java Sat Jan 9 00:46:52 2021 @@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test; public class TestDocumentProtection { @Test - public void testShouldReadEnforcementProperties() throws IOException { + void testShouldReadEnforcementProperties() throws IOException { XWPFDocument documentWithoutDocumentProtectionTag = XWPFTestDataSamples.openSampleDocument("documentProtection_no_protection.docx"); assertFalse(documentWithoutDocumentProtectionTag.isEnforcedReadonlyProtection()); @@ -82,7 +82,7 @@ public class TestDocumentProtection { } @Test - public void testShouldEnforceForReadOnly() throws IOException { + void testShouldEnforceForReadOnly() throws IOException { // XWPFDocument document = createDocumentFromSampleFile("test-data/document/documentProtection_no_protection.docx"); XWPFDocument document = XWPFTestDataSamples.openSampleDocument("documentProtection_no_protection.docx"); assertFalse(document.isEnforcedReadonlyProtection()); @@ -94,7 +94,7 @@ public class TestDocumentProtection { } @Test - public void testShouldEnforceForFillingForms() throws IOException { + void testShouldEnforceForFillingForms() throws IOException { XWPFDocument document = XWPFTestDataSamples.openSampleDocument("documentProtection_no_protection.docx"); assertFalse(document.isEnforcedFillingFormsProtection()); @@ -105,7 +105,7 @@ public class TestDocumentProtection { } @Test - public void testShouldEnforceForComments() throws IOException { + void testShouldEnforceForComments() throws IOException { XWPFDocument document = XWPFTestDataSamples.openSampleDocument("documentProtection_no_protection.docx"); assertFalse(document.isEnforcedCommentsProtection()); @@ -116,7 +116,7 @@ public class TestDocumentProtection { } @Test - public void testShouldEnforceForTrackedChanges() throws IOException { + void testShouldEnforceForTrackedChanges() throws IOException { XWPFDocument document = XWPFTestDataSamples.openSampleDocument("documentProtection_no_protection.docx"); assertFalse(document.isEnforcedTrackedChangesProtection()); @@ -127,7 +127,7 @@ public class TestDocumentProtection { } @Test - public void testShouldUnsetEnforcement() throws IOException { + void testShouldUnsetEnforcement() throws IOException { XWPFDocument document = XWPFTestDataSamples.openSampleDocument("documentProtection_readonly_no_password.docx"); assertTrue(document.isEnforcedReadonlyProtection()); @@ -138,7 +138,7 @@ public class TestDocumentProtection { } @Test - public void testIntegration() throws IOException { + void testIntegration() throws IOException { XWPFDocument doc1 = new XWPFDocument(); XWPFParagraph p1 = doc1.createParagraph(); @@ -163,7 +163,7 @@ public class TestDocumentProtection { } @Test - public void testUpdateFields() throws IOException { + void testUpdateFields() throws IOException { XWPFDocument doc = new XWPFDocument(); assertFalse(doc.isEnforcedUpdateFields()); doc.enforceUpdateFields(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestNecessaryOOXMLClasses.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestNecessaryOOXMLClasses.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestNecessaryOOXMLClasses.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestNecessaryOOXMLClasses.java Sat Jan 9 00:46:52 2021 @@ -30,7 +30,7 @@ import org.openxmlformats.schemas.wordpr public class TestNecessaryOOXMLClasses { @Test - public void testProblemClasses() { + void testProblemClasses() { CTTblLayoutType ctTblLayoutType = CTTblLayoutType.Factory.newInstance(); assertNotNull(ctTblLayoutType); STTblLayoutType stTblLayoutType = STTblLayoutType.Factory.newInstance(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestPackageCorePropertiesGetKeywords.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestPackageCorePropertiesGetKeywords.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestPackageCorePropertiesGetKeywords.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/TestPackageCorePropertiesGetKeywords.java Sat Jan 9 00:46:52 2021 @@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test; */ public final class TestPackageCorePropertiesGetKeywords { @Test - public void testGetSetKeywords() throws IOException { + void testGetSetKeywords() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("TestPoiXMLDocumentCorePropertiesGetKeywords.docx")) { String keywords = doc.getProperties().getCoreProperties().getKeywords(); assertEquals("extractor, test, rdf", keywords); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestExternalEntities.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestExternalEntities.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestExternalEntities.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestExternalEntities.java Sat Jan 9 00:46:52 2021 @@ -32,7 +32,7 @@ public class TestExternalEntities { * Get text out of the simple file */ @Test - public void testFile() throws IOException { + void testFile() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("ExternalEntityInText.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/extractor/TestXWPFWordExtractor.java Sat Jan 9 00:46:52 2021 @@ -44,7 +44,7 @@ public class TestXWPFWordExtractor { * Get text out of the simple file */ @Test - public void testGetSimpleText() throws IOException { + void testGetSimpleText() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -69,7 +69,7 @@ public class TestXWPFWordExtractor { * Tests getting the text out of a complex file */ @Test - public void testGetComplexText() throws IOException { + void testGetComplexText() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("IllustrativeCases.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -96,7 +96,7 @@ public class TestXWPFWordExtractor { } @Test - public void testGetWithHyperlinks() throws IOException { + void testGetWithHyperlinks() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("TestDocument.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -123,7 +123,7 @@ public class TestXWPFWordExtractor { } @Test - public void testHeadersFooters() throws IOException { + void testHeadersFooters() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("ThreeColHeadFoot.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -172,7 +172,7 @@ public class TestXWPFWordExtractor { } @Test - public void testFootnotes() throws IOException { + void testFootnotes() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("footnotes.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { String text = extractor.getText(); @@ -183,7 +183,7 @@ public class TestXWPFWordExtractor { @Test - public void testTableFootnotes() throws IOException { + void testTableFootnotes() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("table_footnotes.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -192,7 +192,7 @@ public class TestXWPFWordExtractor { } @Test - public void testFormFootnotes() throws IOException { + void testFormFootnotes() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("form_footnotes.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -203,7 +203,7 @@ public class TestXWPFWordExtractor { } @Test - public void testEndnotes() throws IOException { + void testEndnotes() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("endnotes.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { String text = extractor.getText(); @@ -213,7 +213,7 @@ public class TestXWPFWordExtractor { } @Test - public void testInsertedDeletedText() throws IOException { + void testInsertedDeletedText() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("delins.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -223,7 +223,7 @@ public class TestXWPFWordExtractor { } @Test - public void testParagraphHeader() throws IOException { + void testParagraphHeader() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Headers.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -238,7 +238,7 @@ public class TestXWPFWordExtractor { * (macro enabled) docx files (bug #45690) */ @Test - public void testDOCMFiles() throws IOException { + void testDOCMFiles() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("45690.docm"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -254,7 +254,7 @@ public class TestXWPFWordExtractor { * we're extracting (bug #49189) */ @Test - public void testDocTabs() throws IOException { + void testDocTabs() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("WithTabs.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -273,7 +273,7 @@ public class TestXWPFWordExtractor { * w:instrText tag (spec sec. 17.16.23) */ @Test - public void testNoFieldCodes() throws IOException { + void testNoFieldCodes() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("FieldCodes.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { String text = extractor.getText(); @@ -288,7 +288,7 @@ public class TestXWPFWordExtractor { * with the fldSimple element (spec sec. 17.16.19) */ @Test - public void testFldSimpleContent() throws IOException { + void testFldSimpleContent() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("FldSimple.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { String text = extractor.getText(); @@ -302,7 +302,7 @@ public class TestXWPFWordExtractor { * NoClassDefFoundError for CTAnchor in XWPFRun */ @Test - public void testDrawings() throws IOException { + void testDrawings() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("drawing.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { String text = extractor.getText(); @@ -314,7 +314,7 @@ public class TestXWPFWordExtractor { * Test for basic extraction of SDT content */ @Test - public void testSimpleControlContent() throws IOException { + void testSimpleControlContent() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Bug54849.docx"); XWPFWordExtractor ex = new XWPFWordExtractor(doc)) { String[] targs = new String[]{ @@ -382,7 +382,7 @@ public class TestXWPFWordExtractor { * No Header or Footer in document */ @Test - public void testBug55733() throws Exception { + void testBug55733() throws Exception { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("55733.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -392,7 +392,7 @@ public class TestXWPFWordExtractor { } @Test - public void testCheckboxes() throws IOException { + void testCheckboxes() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("checkboxes.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -405,7 +405,7 @@ public class TestXWPFWordExtractor { } @Test - public void testMultipleBodyBug() throws IOException { + void testMultipleBodyBug() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("MultipleBodyBug.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { assertEquals("START BODY 1 The quick, brown fox jumps over a lazy dog. END BODY 1.\n" @@ -416,7 +416,7 @@ public class TestXWPFWordExtractor { } @Test - public void testPhonetic() throws IOException { + void testPhonetic() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("61470.docx")) { try (XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { //expect: baseText (phoneticText) @@ -430,7 +430,7 @@ public class TestXWPFWordExtractor { } @Test - public void testCTPictureBase() throws IOException { + void testCTPictureBase() throws IOException { //This forces ctpicturebase to be included in the poi-ooxml-lite jar try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("61991.docx"); XWPFWordExtractor extractor = new XWPFWordExtractor(doc)) { @@ -440,7 +440,7 @@ public class TestXWPFWordExtractor { } @Test - public void testGlossary() throws IOException { + void testGlossary() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("60316.dotx")) { XWPFWordExtractor extractor = new XWPFWordExtractor(doc); String txt = extractor.getText(); @@ -452,7 +452,7 @@ public class TestXWPFWordExtractor { } @Test - public void testPartsInTemplate() throws IOException { + void testPartsInTemplate() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("60316b.dotx")) { XWPFWordExtractor extractor = new XWPFWordExtractor(doc); String txt = extractor.getText(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFDecorators.java Sat Jan 9 00:46:52 2021 @@ -54,7 +54,7 @@ public class TestXWPFDecorators { } @Test - public void testHyperlink() { + void testHyperlink() { XWPFParagraph ps; XWPFParagraph ph; assertEquals(7, simple.getParagraphs().size()); @@ -81,7 +81,7 @@ public class TestXWPFDecorators { } @Test - public void testComments() { + void testComments() { int numComments = 0; for (XWPFParagraph p : comments.getParagraphs()) { XWPFCommentsDecorator d = new XWPFCommentsDecorator(p, null); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/model/TestXWPFHeaderFooterPolicy.java Sat Jan 9 00:46:52 2021 @@ -63,7 +63,7 @@ public class TestXWPFHeaderFooterPolicy } @Test - public void testPolicy() { + void testPolicy() { XWPFHeaderFooterPolicy policy; policy = noHeader.getHeaderFooterPolicy(); @@ -145,7 +145,7 @@ public class TestXWPFHeaderFooterPolicy } @Test - public void testCreate() throws Exception { + void testCreate() throws Exception { try (XWPFDocument doc = new XWPFDocument()) { assertNull(doc.getHeaderFooterPolicy()); assertEquals(0, doc.getHeaderList().size()); @@ -176,7 +176,7 @@ public class TestXWPFHeaderFooterPolicy } @Test - public void testContents() { + void testContents() { XWPFHeaderFooterPolicy policy; // Test a few simple bits off a simple header Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestColumn.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestColumn.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestColumn.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestColumn.java Sat Jan 9 00:46:52 2021 @@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Asse public class TestColumn { @Test - public void testAddNewColWithCorrectAmountOfColumns() throws IOException { + void testAddNewColWithCorrectAmountOfColumns() throws IOException { XWPFDocument doc = new XWPFDocument(); XWPFTable table = doc.createTable(2, 4); table.addNewCol(); @@ -37,7 +37,7 @@ public class TestColumn { } @Test - public void testAddNewColWithEmptyTable() throws IOException { + void testAddNewColWithEmptyTable() throws IOException { XWPFDocument doc = new XWPFDocument(); XWPFTable table = doc.createTable(0, 0); table.removeRow(0); @@ -50,7 +50,7 @@ public class TestColumn { } @Test - public void testAddNewColWithDocx() throws Exception { + void testAddNewColWithDocx() throws Exception { try (XWPFDocument doc = XWPFTestDataSamples .openSampleDocument("TestTableColumns.docx")) { XWPFTable table = doc.getTables().get(0); @@ -64,7 +64,7 @@ public class TestColumn { } @Test - public void testAddNewColWhenRowsHaveDifferentNumbersOfColumnsWithDocx() throws Exception { + void testAddNewColWhenRowsHaveDifferentNumbersOfColumnsWithDocx() throws Exception { try (XWPFDocument doc = XWPFTestDataSamples .openSampleDocument("TestTableColumns.docx")) { XWPFTable table = doc.getTables().get(1); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFBugs.java Sat Jan 9 00:46:52 2021 @@ -126,7 +126,7 @@ public class TestXWPFBugs { } @Test - public void test56392() throws IOException { + void test56392() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("56392.docx")) { assertNotNull(doc); } @@ -136,7 +136,7 @@ public class TestXWPFBugs { * Removing a run needs to remove it from both Runs and IRuns */ @Test - public void test57829() throws IOException { + void test57829() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx")) { assertNotNull(doc); assertEquals(3, doc.getParagraphs().size()); @@ -152,7 +152,7 @@ public class TestXWPFBugs { * Removing a run needs to take into account position of run if paragraph contains hyperlink runs */ @Test - public void test58618() throws IOException { + void test58618() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("58618.docx")) { XWPFParagraph para = (XWPFParagraph) doc.getBodyElements().get(0); assertNotNull(para); @@ -166,7 +166,7 @@ public class TestXWPFBugs { } @Test - public void test59378() throws IOException { + void test59378() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("59378.docx")) { ByteArrayOutputStream out = new ByteArrayOutputStream(); doc.write(out); @@ -181,7 +181,7 @@ public class TestXWPFBugs { } @Test - public void test63788() throws IOException { + void test63788() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFNumbering numbering = doc.createNumbering(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java Sat Jan 9 00:46:52 2021 @@ -41,7 +41,7 @@ public class TestXWPFChart { * test method to check charts are not null */ @Test - public void testRead() throws IOException { + void testRead() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("61745.docx")) { List<XWPFChart> charts = sampleDoc.getCharts(); assertNotNull(charts); @@ -63,7 +63,7 @@ public class TestXWPFChart { * test method to add chart title and check whether it's set */ @Test - public void testChartTitle() throws IOException { + void testChartTitle() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("61745.docx")) { List<XWPFChart> charts = sampleDoc.getCharts(); XWPFChart chart = charts.get(0); @@ -85,7 +85,7 @@ public class TestXWPFChart { * test method to check relationship */ @Test - public void testChartRelation() throws IOException { + void testChartRelation() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("61745.docx")) { List<XWPFChart> charts = sampleDoc.getCharts(); XWPFChart chart = charts.get(0); @@ -99,7 +99,7 @@ public class TestXWPFChart { * test method to check adding chart in document */ @Test - public void testAddChartsToNewDocument() throws InvalidFormatException, IOException { + void testAddChartsToNewDocument() throws InvalidFormatException, IOException { try (XWPFDocument document = new XWPFDocument()) { XWPFChart chart = document.createChart(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFComment.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFComment.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFComment.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFComment.java Sat Jan 9 00:46:52 2021 @@ -25,7 +25,7 @@ import static org.junit.jupiter.api.Asse public class TestXWPFComment { @Test - public void testText() throws IOException { + void testText() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("comment.docx")) { assertEquals(1, doc.getComments().length); XWPFComment comment = doc.getComments()[0]; Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFDocument.java Sat Jan 9 00:46:52 2021 @@ -50,7 +50,7 @@ import org.openxmlformats.schemas.wordpr public final class TestXWPFDocument { @Test - public void testContainsMainContentType() throws Exception { + void testContainsMainContentType() throws Exception { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx"); OPCPackage pack = doc.getPackage(); @@ -71,7 +71,7 @@ public final class TestXWPFDocument { } @Test - public void testOpen() throws Exception { + void testOpen() throws Exception { // Simple file try (XWPFDocument xml1 = XWPFTestDataSamples.openSampleDocument("sample.docx")) { // Check it has key parts @@ -89,7 +89,7 @@ public final class TestXWPFDocument { } @Test - public void testMetadataBasics() throws IOException { + void testMetadataBasics() throws IOException { try (XWPFDocument xml = XWPFTestDataSamples.openSampleDocument("sample.docx")) { assertNotNull(xml.getProperties().getCoreProperties()); assertNotNull(xml.getProperties().getExtendedProperties()); @@ -104,7 +104,7 @@ public final class TestXWPFDocument { } @Test - public void testMetadataComplex() throws IOException { + void testMetadataComplex() throws IOException { XWPFDocument xml = XWPFTestDataSamples.openSampleDocument("IllustrativeCases.docx"); assertNotNull(xml.getProperties().getCoreProperties()); assertNotNull(xml.getProperties().getExtendedProperties()); @@ -121,7 +121,7 @@ public final class TestXWPFDocument { } @Test - public void testWorkbookProperties() throws Exception { + void testWorkbookProperties() throws Exception { XWPFDocument doc = new XWPFDocument(); POIXMLProperties props = doc.getProperties(); assertNotNull(props); @@ -130,7 +130,7 @@ public final class TestXWPFDocument { } @Test - public void testAddParagraph() throws IOException { + void testAddParagraph() throws IOException { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx"); assertEquals(3, doc.getParagraphs().size()); @@ -152,7 +152,7 @@ public final class TestXWPFDocument { } @Test - public void testAddPicture() throws IOException, InvalidFormatException { + void testAddPicture() throws IOException, InvalidFormatException { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx"); byte[] jpeg = XWPFTestDataSamples.getImage("nature1.jpg"); String relationId = doc.addPictureData(jpeg, Document.PICTURE_TYPE_JPEG); @@ -168,7 +168,7 @@ public final class TestXWPFDocument { } @Test - public void testAllPictureFormats() throws IOException, InvalidFormatException { + void testAllPictureFormats() throws IOException, InvalidFormatException { XWPFDocument doc = new XWPFDocument(); doc.addPictureData(new byte[10], Document.PICTURE_TYPE_EMF); @@ -192,7 +192,7 @@ public final class TestXWPFDocument { } @Test - public void testAddHyperlink() throws IOException { + void testAddHyperlink() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("SampleDoc.docx")) { XWPFParagraph p = doc.createParagraph(); XWPFHyperlinkRun h = p.createHyperlinkRun("https://poi.apache.org/"); @@ -212,7 +212,7 @@ public final class TestXWPFDocument { } @Test - public void testRemoveBodyElement() throws IOException { + void testRemoveBodyElement() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx")) { assertEquals(3, doc.getParagraphs().size()); assertEquals(3, doc.getBodyElements().size()); @@ -275,7 +275,7 @@ public final class TestXWPFDocument { } @Test - public void testRegisterPackagePictureData() throws IOException, InvalidFormatException { + void testRegisterPackagePictureData() throws IOException, InvalidFormatException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("issue_51265_1.docx")) { /* manually assemble a new image package part*/ OPCPackage opcPkg = doc.getPackage(); @@ -306,7 +306,7 @@ public final class TestXWPFDocument { } @Test - public void testFindPackagePictureData() throws IOException { + void testFindPackagePictureData() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("issue_51265_1.docx")) { byte[] nature1 = XWPFTestDataSamples.getImage("nature1.gif"); XWPFPictureData part = doc.findPackagePictureData(nature1, Document.PICTURE_TYPE_GIF); @@ -318,7 +318,7 @@ public final class TestXWPFDocument { } @Test - public void testGetAllPictures() throws IOException { + void testGetAllPictures() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("issue_51265_3.docx")) { List<XWPFPictureData> allPictures = doc.getAllPictures(); List<XWPFPictureData> allPackagePictures = doc.getAllPackagePictures(); @@ -336,7 +336,7 @@ public final class TestXWPFDocument { } @Test - public void testGetAllPackagePictures() throws IOException { + void testGetAllPackagePictures() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("issue_51265_3.docx")) { List<XWPFPictureData> allPackagePictures = doc.getAllPackagePictures(); @@ -350,7 +350,7 @@ public final class TestXWPFDocument { } @Test - public void testPictureHandlingSimpleFile() throws IOException, InvalidFormatException { + void testPictureHandlingSimpleFile() throws IOException, InvalidFormatException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("issue_51265_1.docx")) { assertEquals(1, doc.getAllPackagePictures().size()); byte[] newPic = XWPFTestDataSamples.getImage("abstract4.jpg"); @@ -365,7 +365,7 @@ public final class TestXWPFDocument { } @Test - public void testPictureHandlingHeaderDocumentImages() throws IOException { + void testPictureHandlingHeaderDocumentImages() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("issue_51265_2.docx")) { assertEquals(1, doc.getAllPictures().size()); assertEquals(1, doc.getAllPackagePictures().size()); @@ -375,7 +375,7 @@ public final class TestXWPFDocument { } @Test - public void testPictureHandlingComplex() throws IOException, InvalidFormatException { + void testPictureHandlingComplex() throws IOException, InvalidFormatException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("issue_51265_3.docx")) { XWPFHeader xwpfHeader = doc.getHeaderArray(0); @@ -394,7 +394,7 @@ public final class TestXWPFDocument { } @Test - public void testZeroLengthLibreOfficeDocumentWithWaterMarkHeader() throws IOException { + void testZeroLengthLibreOfficeDocumentWithWaterMarkHeader() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("zero-length.docx")) { POIXMLProperties properties = doc.getProperties(); @@ -412,7 +412,7 @@ public final class TestXWPFDocument { } @Test - public void testSettings() throws IOException { + void testSettings() throws IOException { XWPFSettings settings = new XWPFSettings(); assertEquals(100, settings.getZoomPercent()); settings.setZoomPercent(50); @@ -455,7 +455,7 @@ public final class TestXWPFDocument { } @Test - public void testEnforcedWith() throws IOException { + void testEnforcedWith() throws IOException { try (XWPFDocument docx = XWPFTestDataSamples.openSampleDocument("EnforcedWith.docx")) { assertTrue(docx.isEnforcedProtection()); } @@ -463,7 +463,7 @@ public final class TestXWPFDocument { @Test @Disabled("XWPF should be able to write to a new Stream when opened Read-Only") - public void testWriteFromReadOnlyOPC() throws Exception { + void testWriteFromReadOnlyOPC() throws Exception { OPCPackage opc = OPCPackage.open( POIDataSamples.getDocumentInstance().getFile("SampleDoc.docx"), PackageAccess.READ Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnote.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnote.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnote.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnote.java Sat Jan 9 00:46:52 2021 @@ -55,7 +55,7 @@ public class TestXWPFEndnote { } @Test - public void testAddParagraphsToFootnote() throws IOException { + void testAddParagraphsToFootnote() throws IOException { // Add a run to the first paragraph: @@ -99,7 +99,7 @@ public class TestXWPFEndnote { } @Test - public void testAddTableToFootnote() throws IOException { + void testAddTableToFootnote() throws IOException { XWPFTable table = endnote.createTable(); assertNotNull(table); @@ -128,7 +128,7 @@ public class TestXWPFEndnote { } @Test - public void testRemoveEndnote() { + void testRemoveEndnote() { // NOTE: XWPFDocument.removeEndnote() delegates directly to // XWPFEndnotes. docOut.createEndnote(); @@ -140,7 +140,7 @@ public class TestXWPFEndnote { } @Test - public void testAddFootnoteRefToParagraph() { + void testAddFootnoteRefToParagraph() { XWPFParagraph p = docOut.createParagraph(); List<XWPFRun> runs = p.getRuns(); assertEquals(0, runs.size(), "Expected no runs in new paragraph"); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnotes.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnotes.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnotes.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFEndnotes.java Sat Jan 9 00:46:52 2021 @@ -31,7 +31,7 @@ import org.openxmlformats.schemas.wordpr public class TestXWPFEndnotes { @Test - public void testCreateEndnotes() throws IOException{ + void testCreateEndnotes() throws IOException{ try (XWPFDocument docOut = new XWPFDocument()) { XWPFEndnotes footnotes = docOut.createEndnotes(); assertNotNull(footnotes); @@ -42,7 +42,7 @@ public class TestXWPFEndnotes { } @Test - public void testAddEndnotesToDocument() throws IOException { + void testAddEndnotesToDocument() throws IOException { try (XWPFDocument docOut = new XWPFDocument()) { // NOTE: XWPFDocument.createEndnote() delegates directly // to XWPFFootnotes.createEndnote() so this tests Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnote.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnote.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnote.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnote.java Sat Jan 9 00:46:52 2021 @@ -55,7 +55,7 @@ public class TestXWPFFootnote { } @Test - public void testAddParagraphsToFootnote() throws IOException { + void testAddParagraphsToFootnote() throws IOException { // Add a run to the first paragraph: @@ -99,7 +99,7 @@ public class TestXWPFFootnote { } @Test - public void testAddTableToFootnote() throws IOException { + void testAddTableToFootnote() throws IOException { XWPFTable table = footnote.createTable(); assertNotNull(table); @@ -127,7 +127,7 @@ public class TestXWPFFootnote { } @Test - public void testRemoveFootnote() { + void testRemoveFootnote() { // NOTE: XWPFDocument.removeFootnote() delegates directly to // XWPFFootnotes. docOut.createFootnote(); @@ -139,7 +139,7 @@ public class TestXWPFFootnote { } @Test - public void testAddFootnoteRefToParagraph() { + void testAddFootnoteRefToParagraph() { XWPFParagraph p = docOut.createParagraph(); List<XWPFRun> runs = p.getRuns(); assertEquals(0, runs.size(), "Expected no runs in new paragraph"); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFFootnotes.java Sat Jan 9 00:46:52 2021 @@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Asse public class TestXWPFFootnotes { @Test - public void testCreateFootnotes() throws IOException{ + void testCreateFootnotes() throws IOException{ try (XWPFDocument docOut = new XWPFDocument()) { XWPFAbstractFootnotesEndnotes footnotes = docOut.createFootnotes(); @@ -45,7 +45,7 @@ public class TestXWPFFootnotes { } @Test - public void testAddFootnotesToDocument() throws IOException { + void testAddFootnotesToDocument() throws IOException { try (XWPFDocument docOut = new XWPFDocument()) { // NOTE: XWPFDocument.createFootnote() delegates directly @@ -67,7 +67,7 @@ public class TestXWPFFootnotes { * Bug 55066 - avoid double loading the footnotes */ @Test - public void testLoadFootnotesOnce() throws IOException { + void testLoadFootnotesOnce() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Bug54849.docx")) { List<XWPFFootnote> footnotes = doc.getFootnotes(); int hits = 0; Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeader.java Sat Jan 9 00:46:52 2021 @@ -34,7 +34,7 @@ import org.openxmlformats.schemas.wordpr public final class TestXWPFHeader { @Test - public void testSimpleHeader() throws IOException { + void testSimpleHeader() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("headerFooter.docx")) { XWPFHeaderFooterPolicy policy = sampleDoc.getHeaderFooterPolicy(); @@ -47,7 +47,7 @@ public final class TestXWPFHeader { } @Test - public void testImageInHeader() throws IOException { + void testImageInHeader() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("headerPic.docx")) { XWPFHeaderFooterPolicy policy = sampleDoc.getHeaderFooterPolicy(); @@ -60,7 +60,7 @@ public final class TestXWPFHeader { } @Test - public void testSetHeader() throws IOException { + void testSetHeader() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("SampleDoc.docx")) { // no header is set (yet) XWPFHeaderFooterPolicy policy = sampleDoc.getHeaderFooterPolicy(); @@ -181,7 +181,7 @@ public final class TestXWPFHeader { } @Test - public void testSetWatermark() throws IOException { + void testSetWatermark() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("SampleDoc.docx")) { // No header is set (yet) @@ -206,7 +206,7 @@ public final class TestXWPFHeader { } } - public void testSetWatermarkOnEmptyDoc() throws IOException { + void testSetWatermarkOnEmptyDoc() throws IOException { try (XWPFDocument sampleDoc = new XWPFDocument()) { // No header is set (yet) @@ -233,25 +233,25 @@ public final class TestXWPFHeader { @Disabled @Test - public void testAddPictureData() { + void testAddPictureData() { // TODO } @Disabled @Test - public void testGetAllPictures() { + void testGetAllPictures() { // TODO } @Disabled @Test - public void testGetAllPackagePictures() { + void testGetAllPackagePictures() { // TODO } @Disabled @Test - public void testGetPictureDataById() { + void testGetPictureDataById() { // TODO } Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFHeadings.java Sat Jan 9 00:46:52 2021 @@ -33,7 +33,7 @@ public final class TestXWPFHeadings { private static final String HEADING1 = "Heading1"; @Test - public void testSetParagraphStyle() throws IOException { + void testSetParagraphStyle() throws IOException { //new clean instance of paragraph try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("heading123.docx")) { XWPFParagraph p = doc.createParagraph(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFNumbering.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFNumbering.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFNumbering.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFNumbering.java Sat Jan 9 00:46:52 2021 @@ -33,7 +33,7 @@ import org.openxmlformats.schemas.wordpr public class TestXWPFNumbering { @Test - public void testCompareAbstractNum() throws IOException { + void testCompareAbstractNum() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Numbering.docx")) { XWPFNumbering numbering = doc.getNumbering(); BigInteger numId = BigInteger.valueOf(1); @@ -47,7 +47,7 @@ public class TestXWPFNumbering { } @Test - public void testAddNumberingToDoc() throws IOException { + void testAddNumberingToDoc() throws IOException { BigInteger abstractNumId = BigInteger.valueOf(1); BigInteger numId = BigInteger.valueOf(1); @@ -66,7 +66,7 @@ public class TestXWPFNumbering { } @Test - public void testAddAbstractNumIfAbstractNumNotEqualNull() throws IOException { + void testAddAbstractNumIfAbstractNumNotEqualNull() throws IOException { BigInteger abstractNumId = BigInteger.valueOf(1); XWPFDocument docOut = new XWPFDocument(); XWPFNumbering numbering = docOut.createNumbering(); @@ -87,7 +87,7 @@ public class TestXWPFNumbering { } @Test - public void testAddAbstractNumIfAbstractNumEqualNull() throws IOException { + void testAddAbstractNumIfAbstractNumEqualNull() throws IOException { XWPFDocument docOut = new XWPFDocument(); XWPFNumbering numbering = docOut.createNumbering(); @@ -105,7 +105,7 @@ public class TestXWPFNumbering { } @Test - public void testGetNumIlvl() throws IOException { + void testGetNumIlvl() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Numbering.docx")) { BigInteger numIlvl = BigInteger.valueOf(0); assertEquals(numIlvl, doc.getParagraphs().get(0).getNumIlvl()); @@ -115,7 +115,7 @@ public class TestXWPFNumbering { } @Test - public void testGetNumFmt() throws IOException { + void testGetNumFmt() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Numbering.docx")) { assertEquals("bullet", doc.getParagraphs().get(0).getNumFmt()); assertEquals("bullet", doc.getParagraphs().get(1).getNumFmt()); @@ -128,7 +128,7 @@ public class TestXWPFNumbering { } @Test - public void testLvlText() throws IOException { + void testLvlText() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Numbering.docx")) { assertEquals("%1.%2.%3.", doc.getParagraphs().get(12).getNumLevelText()); @@ -143,7 +143,7 @@ public class TestXWPFNumbering { } @Test - public void testOverrideList() throws IOException { + void testOverrideList() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("NumberingWOverrides.docx")) { XWPFParagraph p = doc.getParagraphs().get(4); XWPFNumbering numbering = doc.getNumbering(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java Sat Jan 9 00:46:52 2021 @@ -58,7 +58,7 @@ public final class TestXWPFParagraph { * Check that we get the right paragraph from the header */ @Test - public void testHeaderParagraph() throws IOException { + void testHeaderParagraph() throws IOException { try (XWPFDocument xml = XWPFTestDataSamples.openSampleDocument("ThreeColHead.docx")) { XWPFHeader hdr = xml.getHeaderFooterPolicy().getDefaultHeader(); @@ -77,7 +77,7 @@ public final class TestXWPFParagraph { * Check that we get the right paragraphs from the document */ @Test - public void testDocumentParagraph() throws IOException { + void testDocumentParagraph() throws IOException { try (XWPFDocument xml = XWPFTestDataSamples.openSampleDocument("ThreeColHead.docx")) { List<XWPFParagraph> ps = xml.getParagraphs(); assertEquals(10, ps.size()); @@ -102,7 +102,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetBorderTop() throws IOException { + void testSetGetBorderTop() throws IOException { //new clean instance of paragraph try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -124,7 +124,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetAlignment() throws IOException { + void testSetGetAlignment() throws IOException { //new clean instance of paragraph try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -144,7 +144,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetSpacing() throws IOException { + void testSetGetSpacing() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -183,7 +183,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetSpacingLineRule() throws IOException { + void testSetGetSpacingLineRule() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -202,7 +202,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetIndentationChars() throws IOException { + void testSetGetIndentationChars() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -218,7 +218,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetIndentation() throws IOException { + void testSetGetIndentation() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -238,7 +238,7 @@ public final class TestXWPFParagraph { } } @Test - public void testSetGetVerticalAlignment() throws IOException { + void testSetGetVerticalAlignment() throws IOException { //new clean instance of paragraph try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -256,7 +256,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetWordWrap() throws IOException { + void testSetGetWordWrap() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -273,7 +273,7 @@ public final class TestXWPFParagraph { } @Test - public void testSetGetPageBreak() throws IOException { + void testSetGetPageBreak() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -290,7 +290,7 @@ public final class TestXWPFParagraph { } @Test - public void testBookmarks() throws IOException { + void testBookmarks() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("bookmarks.docx")) { XWPFParagraph paragraph = doc.getParagraphs().get(0); assertEquals("Sample Word Document", paragraph.getText()); @@ -305,7 +305,7 @@ public final class TestXWPFParagraph { } @Test - public void testGetSetNumID() throws IOException { + void testGetSetNumID() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -315,7 +315,7 @@ public final class TestXWPFParagraph { } @Test - public void testGetSetILvl() throws IOException { + void testGetSetILvl() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -325,7 +325,7 @@ public final class TestXWPFParagraph { } @Test - public void testAddingRuns() throws IOException { + void testAddingRuns() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("sample.docx")) { XWPFParagraph p = doc.getParagraphs().get(0); @@ -343,7 +343,7 @@ public final class TestXWPFParagraph { } @Test - public void testCreateNewRuns() throws IOException { + void testCreateNewRuns() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -364,7 +364,7 @@ public final class TestXWPFParagraph { } @Test - public void testInsertNewRuns() throws IOException { + void testInsertNewRuns() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -384,7 +384,7 @@ public final class TestXWPFParagraph { } @Test - public void testRemoveRuns() throws IOException { + void testRemoveRuns() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -415,7 +415,7 @@ public final class TestXWPFParagraph { } @Test - public void testRemoveAndInsertRunsWithOtherIRunElement() + void testRemoveAndInsertRunsWithOtherIRunElement() throws IOException { XWPFDocument doc = new XWPFDocument(); @@ -475,7 +475,7 @@ public final class TestXWPFParagraph { } @Test - public void testPictures() throws IOException { + void testPictures() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("VariousPictures.docx")) { assertEquals(7, doc.getParagraphs().size()); @@ -550,7 +550,7 @@ public final class TestXWPFParagraph { } @Test - public void testTika792() throws Exception { + void testTika792() throws Exception { //This test forces the loading of CTMoveBookmark and //CTMoveBookmarkImpl into ooxml-lite. try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Tika-792.docx")) { @@ -562,7 +562,7 @@ public final class TestXWPFParagraph { } @Test - public void testSettersGetters() throws IOException { + void testSettersGetters() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -687,7 +687,7 @@ public final class TestXWPFParagraph { } @Test - public void testSearchTextNotFound() throws IOException { + void testSearchTextNotFound() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -697,7 +697,7 @@ public final class TestXWPFParagraph { } @Test - public void testSearchTextFound() throws IOException { + void testSearchTextFound() throws IOException { try (XWPFDocument xml = XWPFTestDataSamples.openSampleDocument("ThreeColHead.docx")) { List<XWPFParagraph> ps = xml.getParagraphs(); @@ -715,7 +715,7 @@ public final class TestXWPFParagraph { } @Test - public void testFieldRuns() throws IOException { + void testFieldRuns() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("FldSimple.docx")) { List<XWPFParagraph> ps = doc.getParagraphs(); assertEquals(1, ps.size()); @@ -736,7 +736,7 @@ public final class TestXWPFParagraph { @SuppressWarnings("deprecation") @Test - public void testRuns() throws IOException { + void testRuns() throws IOException { try (XWPFDocument doc = new XWPFDocument()) { XWPFParagraph p = doc.createParagraph(); @@ -751,7 +751,7 @@ public final class TestXWPFParagraph { } @Test - public void test58067() throws IOException { + void test58067() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("58067.docx")) { StringBuilder str = new StringBuilder(); @@ -763,7 +763,7 @@ public final class TestXWPFParagraph { } @Test - public void test61787() throws IOException { + void test61787() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("61787.docx")) { StringBuilder str = new StringBuilder(); @@ -782,7 +782,7 @@ public final class TestXWPFParagraph { * for someone else trying a similar thing */ @Test - public void testNumberedLists() throws Exception { + void testNumberedLists() throws Exception { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("ComplexNumberedLists.docx")) { XWPFParagraph p; Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFPictureData.java Sat Jan 9 00:46:52 2021 @@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test; public class TestXWPFPictureData { @Test - public void testRead() throws InvalidFormatException, IOException { + void testRead() throws InvalidFormatException, IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("VariousPictures.docx")) { List<XWPFPictureData> pictures = sampleDoc.getAllPictures(); @@ -64,7 +64,7 @@ public class TestXWPFPictureData { } @Test - public void testPictureInHeader() throws IOException { + void testPictureInHeader() throws IOException { try (XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("headerPic.docx")) { verifyOneHeaderPicture(sampleDoc); @@ -74,7 +74,7 @@ public class TestXWPFPictureData { } @Test - public void testCreateHeaderPicture() throws Exception { + void testCreateHeaderPicture() throws Exception { try (XWPFDocument doc = new XWPFDocument()) { // Starts with no header @@ -113,7 +113,7 @@ public class TestXWPFPictureData { } @Test - public void testNew() throws InvalidFormatException, IOException { + void testNew() throws InvalidFormatException, IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("EmptyDocumentWithHeaderFooter.docx")) { byte[] jpegData = XWPFTestDataSamples.getImage("nature1.jpg"); assertNotNull(jpegData); @@ -172,7 +172,7 @@ public class TestXWPFPictureData { } @Test - public void testBug51770() throws IOException { + void testBug51770() throws IOException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Bug51170.docx")) { XWPFHeaderFooterPolicy policy = doc.getHeaderFooterPolicy(); XWPFHeader header = policy.getDefaultHeader(); Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFRun.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFRun.java?rev=1885283&r1=1885282&r2=1885283&view=diff ============================================================================== --- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFRun.java (original) +++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFRun.java Sat Jan 9 00:46:52 2021 @@ -79,7 +79,7 @@ public class TestXWPFRun { } @Test - public void testSetGetText() { + void testSetGetText() { ctRun.addNewT().setStringValue("TEST STRING"); ctRun.addNewT().setStringValue("TEST2 STRING"); ctRun.addNewT().setStringValue("TEST3 STRING"); @@ -102,7 +102,7 @@ public class TestXWPFRun { * exercise isCTOnOff(CTOnOff) through all valid permutations */ @Test - public void testCTOnOff() { + void testCTOnOff() { CTRPr rpr = ctRun.addNewRPr(); CTOnOff bold = rpr.addNewB(); XWPFRun run = new XWPFRun(ctRun, irb); @@ -129,7 +129,7 @@ public class TestXWPFRun { } @Test - public void testSetGetBold() { + void testSetGetBold() { CTRPr rpr = ctRun.addNewRPr(); rpr.addNewB().setVal(STOnOff1.ON); @@ -143,7 +143,7 @@ public class TestXWPFRun { } @Test - public void testSetGetItalic() { + void testSetGetItalic() { CTRPr rpr = ctRun.addNewRPr(); rpr.addNewI().setVal(STOnOff1.ON); @@ -155,7 +155,7 @@ public class TestXWPFRun { } @Test - public void testSetGetStrike() { + void testSetGetStrike() { CTRPr rpr = ctRun.addNewRPr(); rpr.addNewStrike().setVal(STOnOff1.ON); @@ -167,7 +167,7 @@ public class TestXWPFRun { } @Test - public void testSetGetUnderline() { + void testSetGetUnderline() { CTRPr rpr = ctRun.addNewRPr(); XWPFRun run = new XWPFRun(ctRun, irb); rpr.addNewU().setVal(STUnderline.DASH); @@ -181,7 +181,7 @@ public class TestXWPFRun { } @Test - public void testSetGetFontFamily() { + void testSetGetFontFamily() { CTRPr rpr = ctRun.addNewRPr(); rpr.addNewRFonts().setAscii("Times New Roman"); @@ -193,7 +193,7 @@ public class TestXWPFRun { } @Test - public void testSetGetFontSize() { + void testSetGetFontSize() { CTRPr rpr = ctRun.addNewRPr(); rpr.addNewSz().setVal(BigInteger.valueOf(14)); @@ -211,7 +211,7 @@ public class TestXWPFRun { } @Test - public void testSetGetTextForegroundBackground() { + void testSetGetTextForegroundBackground() { CTRPr rpr = ctRun.addNewRPr(); rpr.addNewPosition().setVal(new BigInteger("4000")); @@ -223,7 +223,7 @@ public class TestXWPFRun { } @Test - public void testSetGetColor() { + void testSetGetColor() { XWPFRun run = new XWPFRun(ctRun, irb); run.setColor("0F0F0F"); String clr = run.getColor(); @@ -231,7 +231,7 @@ public class TestXWPFRun { } @Test - public void testAddCarriageReturn() { + void testAddCarriageReturn() { ctRun.addNewT().setStringValue("TEST STRING"); ctRun.addNewCr(); ctRun.addNewT().setStringValue("TEST2 STRING"); @@ -251,7 +251,7 @@ public class TestXWPFRun { } @Test - public void testAddTabsAndLineBreaks() { + void testAddTabsAndLineBreaks() { ctRun.addNewT().setStringValue("TEST STRING"); ctRun.addNewCr(); ctRun.addNewT().setStringValue("TEST2 STRING"); @@ -273,7 +273,7 @@ public class TestXWPFRun { } @Test - public void testAddPageBreak() { + void testAddPageBreak() { ctRun.addNewT().setStringValue("TEST STRING"); ctRun.addNewBr(); ctRun.addNewT().setStringValue("TEST2 STRING"); @@ -295,7 +295,7 @@ public class TestXWPFRun { * right thing with it */ @Test - public void testExisting() throws IOException { + void testExisting() throws IOException { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("TestDocument.docx"); XWPFParagraph p; XWPFRun run; @@ -429,7 +429,7 @@ public class TestXWPFRun { } @Test - public void testPictureInHeader() throws IOException { + void testPictureInHeader() throws IOException { XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("headerPic.docx"); XWPFHeaderFooterPolicy policy = sampleDoc.getHeaderFooterPolicy(); @@ -455,7 +455,7 @@ public class TestXWPFRun { } @Test - public void testSetGetLang() { + void testSetGetLang() { XWPFRun run = p.createRun(); assertNull(run.getLang()); @@ -470,7 +470,7 @@ public class TestXWPFRun { } @Test - public void testSetGetLang2() { + void testSetGetLang2() { XWPFRun run = p.createRun(); assertNull(run.getLang()); @@ -485,7 +485,7 @@ public class TestXWPFRun { } @Test - public void testAddPicture() throws Exception { + void testAddPicture() throws Exception { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("TestDocument.docx"); XWPFParagraph p = doc.getParagraphArray(2); XWPFRun r = p.getRuns().get(0); @@ -512,7 +512,7 @@ public class TestXWPFRun { * Bugzilla #58237 - Unable to add image to word document header */ @Test - public void testAddPictureInHeader() throws IOException, InvalidFormatException { + void testAddPictureInHeader() throws IOException, InvalidFormatException { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("TestDocument.docx"); XWPFHeader hdr = doc.createHeader(HeaderFooterType.DEFAULT); XWPFParagraph p = hdr.createParagraph(); @@ -553,7 +553,7 @@ public class TestXWPFRun { * run mustn't NPE */ @Test - public void testSetFontFamily_52288() throws IOException { + void testSetFontFamily_52288() throws IOException { XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("52288.docx"); final Iterator<XWPFParagraph> paragraphs = doc.getParagraphsIterator(); while (paragraphs.hasNext()) { @@ -571,7 +571,7 @@ public class TestXWPFRun { } @Test - public void testBug55476() throws IOException, InvalidFormatException { + void testBug55476() throws IOException, InvalidFormatException { byte[] image = XWPFTestDataSamples.getImage("abstract1.jpg"); XWPFDocument document = new XWPFDocument(); @@ -594,7 +594,7 @@ public class TestXWPFRun { } @Test - public void testBug58922() throws IOException { + void testBug58922() throws IOException { XWPFDocument document = new XWPFDocument(); final XWPFRun run = document.createParagraph().createRun(); @@ -654,7 +654,7 @@ public class TestXWPFRun { } @Test - public void testSetters() { + void testSetters() { XWPFDocument document = new XWPFDocument(); final XWPFRun run = document.createParagraph().createRun(); @@ -676,7 +676,7 @@ public class TestXWPFRun { } @Test - public void testSetGetTextScale() throws IOException { + void testSetGetTextScale() throws IOException { XWPFDocument document = new XWPFDocument(); final XWPFRun run = document.createParagraph().createRun(); assertEquals(100, run.getTextScale()); @@ -686,7 +686,7 @@ public class TestXWPFRun { } @Test - public void testSetGetTextHighlightColor() throws IOException { + void testSetGetTextHighlightColor() throws IOException { XWPFDocument document = new XWPFDocument(); final XWPFRun run = document.createParagraph().createRun(); assertEquals(STHighlightColor.NONE, run.getTextHightlightColor()); @@ -701,7 +701,7 @@ public class TestXWPFRun { } @Test - public void testSetGetVanish() throws IOException { + void testSetGetVanish() throws IOException { XWPFDocument document = new XWPFDocument(); final XWPFRun run = document.createParagraph().createRun(); assertFalse(run.isVanish()); @@ -713,7 +713,7 @@ public class TestXWPFRun { } @Test - public void testSetGetVerticalAlignment() throws IOException { + void testSetGetVerticalAlignment() throws IOException { XWPFDocument document = new XWPFDocument(); XWPFRun run = document.createParagraph().createRun(); assertEquals(STVerticalAlignRun.BASELINE, run.getVerticalAlignment()); @@ -727,7 +727,7 @@ public class TestXWPFRun { } @Test - public void testSetGetVAlign() { + void testSetGetVAlign() { CTRPr rpr = ctRun.addNewRPr(); rpr.addNewVertAlign().setVal(STVerticalAlignRun.SUBSCRIPT); @@ -738,7 +738,7 @@ public class TestXWPFRun { } @Test - public void testSetGetEmphasisMark() throws IOException { + void testSetGetEmphasisMark() throws IOException { XWPFDocument document = new XWPFDocument(); XWPFRun run = document.createParagraph().createRun(); assertEquals(STEm.NONE, run.getEmphasisMark()); @@ -750,7 +750,7 @@ public class TestXWPFRun { } @Test - public void testSetGetUnderlineColor() throws IOException { + void testSetGetUnderlineColor() throws IOException { XWPFDocument document = new XWPFDocument(); XWPFRun run = document.createParagraph().createRun(); assertEquals("auto", run.getUnderlineColor()); @@ -765,7 +765,7 @@ public class TestXWPFRun { } @Test - public void testSetGetUnderlineThemeColor() throws IOException { + void testSetGetUnderlineThemeColor() throws IOException { XWPFDocument document = new XWPFDocument(); XWPFRun run = document.createParagraph().createRun(); assertEquals(STThemeColor.NONE, run.getUnderlineThemeColor()); @@ -781,7 +781,7 @@ public class TestXWPFRun { @Test - public void testSetStyleId() throws IOException { + void testSetStyleId() throws IOException { XWPFDocument document = XWPFTestDataSamples.openSampleDocument("SampleDoc.docx"); final XWPFRun run = document.createParagraph().createRun(); @@ -797,7 +797,7 @@ public class TestXWPFRun { } @Test - public void testGetDepthWidth() throws IOException, InvalidFormatException { + void testGetDepthWidth() throws IOException, InvalidFormatException { try (XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("TestDocument.docx")) { XWPFHeader hdr = doc.createHeader(HeaderFooterType.DEFAULT); XWPFParagraph p = hdr.createParagraph(); @@ -819,7 +819,7 @@ public class TestXWPFRun { } @Test - public void testWhitespace() throws IOException { + void testWhitespace() throws IOException { String[] text = new String[] { " The quick brown fox", "\t\tjumped over the lazy dog" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org