]> source.dussan.org Git - poi.git/commitdiff
Sonar fixes
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 10 Jan 2021 21:16:04 +0000 (21:16 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 10 Jan 2021 21:16:04 +0000 (21:16 +0000)
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

381 files changed:
src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntPrecision.java
src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSet.java
src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntSetDoubleCell.java
src/excelant/testcases/org/apache/poi/ss/excelant/TestExcelAntUserDefinedFunction.java
src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java
src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtil.java
src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntWorkbookUtilFactory.java
src/integrationtest/org/apache/poi/stress/BaseIntegrationTest.java
src/integrationtest/org/apache/poi/stress/HDGFFileHandler.java
src/integrationtest/org/apache/poi/stress/HMEFFileHandler.java
src/integrationtest/org/apache/poi/stress/HPBFFileHandler.java
src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
src/integrationtest/org/apache/poi/stress/HSLFFileHandler.java
src/integrationtest/org/apache/poi/stress/HSMFFileHandler.java
src/integrationtest/org/apache/poi/stress/HSSFFileHandler.java
src/integrationtest/org/apache/poi/stress/HSSFRecordsStresser.java
src/integrationtest/org/apache/poi/stress/HWPFFileHandler.java
src/integrationtest/org/apache/poi/stress/OPCFileHandler.java
src/integrationtest/org/apache/poi/stress/POIFSFileHandler.java
src/integrationtest/org/apache/poi/stress/POIFileScanner.java
src/integrationtest/org/apache/poi/stress/TestAllFiles.java
src/integrationtest/org/apache/poi/stress/XDGFFileHandler.java
src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
src/integrationtest/org/apache/poi/stress/XSSFBFileHandler.java
src/integrationtest/org/apache/poi/stress/XSSFFileHandler.java
src/integrationtest/org/apache/poi/stress/XWPFFileHandler.java
src/multimodule/integration/java9/module-info.java
src/ooxml/testcases/org/apache/poi/ss/tests/formula/functions/CountifsTests.java [deleted file]
src/ooxml/testcases/org/apache/poi/ss/tests/formula/functions/TestCountifs.java [new file with mode: 0644]
src/ooxml/testcases/org/apache/poi/ss/tests/usermodel/ConditionalFormattingEvalTest.java [deleted file]
src/ooxml/testcases/org/apache/poi/ss/tests/usermodel/TestConditionalFormattingEval.java [new file with mode: 0644]
src/ooxml/testcases/org/apache/poi/xdgf/usermodel/section/CombinedIteratorTest.java [deleted file]
src/ooxml/testcases/org/apache/poi/xdgf/usermodel/section/TestCombinedIterator.java [new file with mode: 0644]
src/ooxml/testcases/org/apache/poi/xssf/TestXSSFMemoryLeak.java [new file with mode: 0644]
src/ooxml/testcases/org/apache/poi/xssf/XSSFMemoryLeakTests.java [deleted file]
src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFAbstractNum.java [new file with mode: 0644]
src/ooxml/testcases/org/apache/poi/xwpf/usermodel/XWPFAbstractNumTest.java [deleted file]
src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java [deleted file]
src/scratchpad/testcases/org/apache/poi/hslf/dev/BaseTestPPTIterating.java [new file with mode: 0644]
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPDrawingTextListing.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestPPTXMLDump.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTListing.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSLWTTextListing.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideAndNotesAtomListing.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideIdListing.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowDumper.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestSlideShowRecordDumper.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestTextStyleListing.java
src/scratchpad/testcases/org/apache/poi/hslf/dev/TestUserEditAndPersistListing.java
src/scratchpad/testcases/org/apache/poi/hwpf/converter/AbstractWordUtilsTest.java [deleted file]
src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestAbstractWordUtils.java [new file with mode: 0644]
src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java [deleted file]
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlfLfo.java [new file with mode: 0644]
src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java [deleted file]
src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LVLFAbstractTypeTest.java [deleted file]
src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLFOLVLBaseAbstractType.java [new file with mode: 0644]
src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLVLFAbstractType.java [new file with mode: 0644]
src/testcases/org/apache/poi/TestPOIDocumentMain.java
src/testcases/org/apache/poi/TestPOITestCase.java
src/testcases/org/apache/poi/ddf/TestEscherBSERecord.java
src/testcases/org/apache/poi/ddf/TestEscherBlipRecord.java
src/testcases/org/apache/poi/ddf/TestEscherBoolProperty.java
src/testcases/org/apache/poi/ddf/TestEscherChildAnchorRecord.java
src/testcases/org/apache/poi/ddf/TestEscherContainerRecord.java
src/testcases/org/apache/poi/ddf/TestEscherDgRecord.java
src/testcases/org/apache/poi/ddf/TestEscherDggRecord.java
src/testcases/org/apache/poi/ddf/TestEscherOptRecord.java
src/testcases/org/apache/poi/ddf/TestEscherSpgrRecord.java
src/testcases/org/apache/poi/ddf/TestEscherSplitMenuColorsRecord.java
src/testcases/org/apache/poi/ddf/TestUnknownEscherRecord.java
src/testcases/org/apache/poi/hpsf/basic/TestBasic.java
src/testcases/org/apache/poi/hpsf/basic/TestClassID.java
src/testcases/org/apache/poi/hpsf/basic/TestEmptyProperties.java
src/testcases/org/apache/poi/hpsf/basic/TestHPSFBugs.java
src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java
src/testcases/org/apache/poi/hpsf/extractor/TestHPSFPropertiesExtractor.java
src/testcases/org/apache/poi/hssf/eventmodel/TestAbortableListener.java
src/testcases/org/apache/poi/hssf/eventmodel/TestEventRecordFactory.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestEventWorkbookBuilder.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestFormatTrackingHSSFListener.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestHSSFEventFactory.java
src/testcases/org/apache/poi/hssf/eventusermodel/TestMissingRecordAwareHSSFListener.java
src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java
src/testcases/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java
src/testcases/org/apache/poi/hssf/model/TestDrawingManager2.java
src/testcases/org/apache/poi/hssf/model/TestFormulaParser.java
src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java
src/testcases/org/apache/poi/hssf/model/TestFormulaParserIf.java
src/testcases/org/apache/poi/hssf/model/TestLinkTable.java
src/testcases/org/apache/poi/hssf/model/TestOperandClassTransformer.java
src/testcases/org/apache/poi/hssf/model/TestRVA.java
src/testcases/org/apache/poi/hssf/model/TestRowBlocksReader.java
src/testcases/org/apache/poi/hssf/model/TestSheet.java
src/testcases/org/apache/poi/hssf/model/TestSheetAdditional.java
src/testcases/org/apache/poi/hssf/model/TestWorkbook.java
src/testcases/org/apache/poi/hssf/record/TestArrayRecord.java
src/testcases/org/apache/poi/hssf/record/TestAutoFilterInfoRecord.java
src/testcases/org/apache/poi/hssf/record/TestBOFRecord.java
src/testcases/org/apache/poi/hssf/record/TestBoolErrRecord.java
src/testcases/org/apache/poi/hssf/record/TestBoundSheetRecord.java
src/testcases/org/apache/poi/hssf/record/TestCFHeaderRecord.java
src/testcases/org/apache/poi/hssf/record/TestCFRuleRecord.java
src/testcases/org/apache/poi/hssf/record/TestColumnInfoRecord.java
src/testcases/org/apache/poi/hssf/record/TestCommonObjectDataSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestDVALRecord.java
src/testcases/org/apache/poi/hssf/record/TestDrawingGroupRecord.java
src/testcases/org/apache/poi/hssf/record/TestDrawingRecord.java
src/testcases/org/apache/poi/hssf/record/TestEmbeddedObjectRefSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestEndSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestEscherAggregate.java
src/testcases/org/apache/poi/hssf/record/TestExtSSTRecord.java
src/testcases/org/apache/poi/hssf/record/TestExtendedFormatRecord.java
src/testcases/org/apache/poi/hssf/record/TestExternalNameRecord.java
src/testcases/org/apache/poi/hssf/record/TestFeatRecord.java
src/testcases/org/apache/poi/hssf/record/TestFontRecord.java
src/testcases/org/apache/poi/hssf/record/TestFormulaRecord.java
src/testcases/org/apache/poi/hssf/record/TestFtCblsSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestHyperlinkRecord.java
src/testcases/org/apache/poi/hssf/record/TestInterfaceEndRecord.java
src/testcases/org/apache/poi/hssf/record/TestLabelRecord.java
src/testcases/org/apache/poi/hssf/record/TestLbsDataSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestMergeCellsRecord.java
src/testcases/org/apache/poi/hssf/record/TestNameCommentRecord.java
src/testcases/org/apache/poi/hssf/record/TestNameRecord.java
src/testcases/org/apache/poi/hssf/record/TestNoteRecord.java
src/testcases/org/apache/poi/hssf/record/TestNoteStructureSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestObjRecord.java
src/testcases/org/apache/poi/hssf/record/TestPLVRecord.java
src/testcases/org/apache/poi/hssf/record/TestPaletteRecord.java
src/testcases/org/apache/poi/hssf/record/TestPaneRecord.java
src/testcases/org/apache/poi/hssf/record/TestRecalcIdRecord.java
src/testcases/org/apache/poi/hssf/record/TestRecordFactory.java
src/testcases/org/apache/poi/hssf/record/TestRecordFactoryInputStream.java
src/testcases/org/apache/poi/hssf/record/TestRecordInputStream.java
src/testcases/org/apache/poi/hssf/record/TestSCLRecord.java
src/testcases/org/apache/poi/hssf/record/TestSSTDeserializer.java
src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java
src/testcases/org/apache/poi/hssf/record/TestSSTRecordSizeCalculator.java
src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java
src/testcases/org/apache/poi/hssf/record/TestStringRecord.java
src/testcases/org/apache/poi/hssf/record/TestStyleRecord.java
src/testcases/org/apache/poi/hssf/record/TestSubRecord.java
src/testcases/org/apache/poi/hssf/record/TestSupBookRecord.java
src/testcases/org/apache/poi/hssf/record/TestTableRecord.java
src/testcases/org/apache/poi/hssf/record/TestTextObjectBaseRecord.java
src/testcases/org/apache/poi/hssf/record/TestTextObjectRecord.java
src/testcases/org/apache/poi/hssf/record/TestUnicodeNameRecord.java
src/testcases/org/apache/poi/hssf/record/TestWriteAccessRecord.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestCFRecordsAggregate.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestColumnInfoRecordsAggregate.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestFormulaRecordAggregate.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestPageSettingsBlock.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestRowRecordsAggregate.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestSharedValueManager.java
src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
src/testcases/org/apache/poi/hssf/record/cf/TestCellRange.java
src/testcases/org/apache/poi/hssf/record/chart/TestAreaFormatRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestAreaRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestAxisLineFormatRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestAxisOptionsRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestAxisParentRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestAxisRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestAxisUsedRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestBarRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestCategorySeriesAxisRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestChartFormatRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestChartRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestChartTitleFormatRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestDatRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestDataFormatRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestDefaultDataLabelTextPropertiesRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestFontBasisRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestFontIndexRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestFrameRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestLegendRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestLineFormatRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestLinkedDataRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestNumberFormatIndexRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestObjectLinkRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestPlotAreaRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestPlotGrowthRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestSeriesChartGroupIndexRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestSeriesIndexRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestSeriesLabelsRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestSeriesListRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestSeriesRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestSeriesTextRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestSheetPropertiesRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestTextRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestTickRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestUnitsRecord.java
src/testcases/org/apache/poi/hssf/record/chart/TestValueRangeRecord.java
src/testcases/org/apache/poi/hssf/record/common/TestUnicodeString.java
src/testcases/org/apache/poi/hssf/record/pivot/TestExtendedPivotTableViewFieldsRecord.java
src/testcases/org/apache/poi/hssf/record/pivot/TestPageItemRecord.java
src/testcases/org/apache/poi/hssf/record/pivot/TestViewFieldsRecord.java
src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java
src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
src/testcases/org/apache/poi/hssf/usermodel/TestCloneSheet.java
src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java
src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics.java
src/testcases/org/apache/poi/hssf/usermodel/TestEscherGraphics2d.java
src/testcases/org/apache/poi/hssf/usermodel/TestFontDetails.java
src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorDocs.java
src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFChart.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFClientAnchor.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFConditionalFormatting.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFExternalFunctions.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFont.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHeaderFooter.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPatriarch.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPicture.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPictureData.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRichTextString.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheetAutosizeColumn.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheetShiftRows.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheetUpdateArrayFormulas.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFTextbox.java
src/testcases/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java
src/testcases/org/apache/poi/hssf/usermodel/TestNonStandardWorkbookStreamNames.java
src/testcases/org/apache/poi/hssf/usermodel/TestOLE2Embeding.java
src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java
src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
src/testcases/org/apache/poi/hssf/usermodel/TestSanityChecker.java
src/testcases/org/apache/poi/hssf/usermodel/TestSheetHiding.java
src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java
src/testcases/org/apache/poi/hssf/usermodel/TestUnicodeWorkbook.java
src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
src/testcases/org/apache/poi/hssf/util/TestAreaReference.java
src/testcases/org/apache/poi/hssf/util/TestCellReference.java
src/testcases/org/apache/poi/hssf/util/TestHSSFColor.java
src/testcases/org/apache/poi/hssf/util/TestRKUtil.java
src/testcases/org/apache/poi/poifs/crypt/TestBiff8DecryptingStream.java
src/testcases/org/apache/poi/poifs/eventfilesystem/TestPOIFSReaderRegistry.java
src/testcases/org/apache/poi/poifs/filesystem/TestDirectoryNode.java
src/testcases/org/apache/poi/poifs/filesystem/TestDocumentDescriptor.java
src/testcases/org/apache/poi/poifs/filesystem/TestDocumentInputStream.java
src/testcases/org/apache/poi/poifs/filesystem/TestDocumentOutputStream.java
src/testcases/org/apache/poi/poifs/filesystem/TestEmptyDocument.java
src/testcases/org/apache/poi/poifs/filesystem/TestFileSystemBugs.java
src/testcases/org/apache/poi/poifs/filesystem/TestFilteringDirectoryNode.java
src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSDocumentPath.java
src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSFileSystem.java
src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSMiniStore.java
src/testcases/org/apache/poi/poifs/filesystem/TestPOIFSStream.java
src/testcases/org/apache/poi/poifs/filesystem/TestPropertySorter.java
src/testcases/org/apache/poi/poifs/property/TestDirectoryProperty.java
src/testcases/org/apache/poi/poifs/property/TestDocumentProperty.java
src/testcases/org/apache/poi/poifs/property/TestPropertyFactory.java
src/testcases/org/apache/poi/poifs/property/TestPropertyTable.java
src/testcases/org/apache/poi/poifs/property/TestRootProperty.java
src/testcases/org/apache/poi/poifs/storage/TestBATBlock.java
src/testcases/org/apache/poi/poifs/storage/TestHeaderBlockReading.java
src/testcases/org/apache/poi/ss/TestSpreadsheetVersion.java
src/testcases/org/apache/poi/ss/formula/TestFormulaShifter.java
src/testcases/org/apache/poi/ss/formula/TestSheetNameFormatter.java
src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculator.java
src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/constant/TestConstantValueParser.java
src/testcases/org/apache/poi/ss/formula/eval/TestAreaEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestDivideEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestEqualEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestExternalFunction.java
src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java
src/testcases/org/apache/poi/ss/formula/eval/TestHSSFCircularReferences.java
src/testcases/org/apache/poi/ss/formula/eval/TestMinusZeroResult.java
src/testcases/org/apache/poi/ss/formula/eval/TestMissingArgEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestOperandResolver.java
src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestPowerEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestRangeEval.java
src/testcases/org/apache/poi/ss/formula/eval/TestUnaryPlusEval.java
src/testcases/org/apache/poi/ss/formula/function/TestFunctionMetadataRegistry.java
src/testcases/org/apache/poi/ss/formula/function/TestParseMissingBuiltInFuncs.java
src/testcases/org/apache/poi/ss/formula/function/TestReadMissingBuiltInFuncs.java
src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java
src/testcases/org/apache/poi/ss/formula/functions/TestAreas.java
src/testcases/org/apache/poi/ss/formula/functions/TestAverage.java
src/testcases/org/apache/poi/ss/formula/functions/TestBin2Dec.java
src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java
src/testcases/org/apache/poi/ss/formula/functions/TestClean.java
src/testcases/org/apache/poi/ss/formula/functions/TestCountFuncs.java
src/testcases/org/apache/poi/ss/formula/functions/TestDate.java
src/testcases/org/apache/poi/ss/formula/functions/TestDateValue.java
src/testcases/org/apache/poi/ss/formula/functions/TestDays360.java
src/testcases/org/apache/poi/ss/formula/functions/TestDec2Bin.java
src/testcases/org/apache/poi/ss/formula/functions/TestDec2Hex.java
src/testcases/org/apache/poi/ss/formula/functions/TestDelta.java
src/testcases/org/apache/poi/ss/formula/functions/TestFind.java
src/testcases/org/apache/poi/ss/formula/functions/TestFixed.java
src/testcases/org/apache/poi/ss/formula/functions/TestHex2Dec.java
src/testcases/org/apache/poi/ss/formula/functions/TestIPMT.java
src/testcases/org/apache/poi/ss/formula/functions/TestIndex.java
src/testcases/org/apache/poi/ss/formula/functions/TestIndexFunctionFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/functions/TestIndirect.java
src/testcases/org/apache/poi/ss/formula/functions/TestIndirectFunctionFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/functions/TestIntercept.java
src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java
src/testcases/org/apache/poi/ss/formula/functions/TestIsBlank.java
src/testcases/org/apache/poi/ss/formula/functions/TestLen.java
src/testcases/org/apache/poi/ss/formula/functions/TestLookupFunctionsFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/functions/TestMatch.java
src/testcases/org/apache/poi/ss/formula/functions/TestMatchFunctionsFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/functions/TestMid.java
src/testcases/org/apache/poi/ss/formula/functions/TestMirr.java
src/testcases/org/apache/poi/ss/formula/functions/TestNper.java
src/testcases/org/apache/poi/ss/formula/functions/TestNpv.java
src/testcases/org/apache/poi/ss/formula/functions/TestOct2Dec.java
src/testcases/org/apache/poi/ss/formula/functions/TestOffset.java
src/testcases/org/apache/poi/ss/formula/functions/TestPPMT.java
src/testcases/org/apache/poi/ss/formula/functions/TestPmt.java
src/testcases/org/apache/poi/ss/formula/functions/TestRank.java
src/testcases/org/apache/poi/ss/formula/functions/TestRoundFuncs.java
src/testcases/org/apache/poi/ss/formula/functions/TestRowCol.java
src/testcases/org/apache/poi/ss/formula/functions/TestSlope.java
src/testcases/org/apache/poi/ss/formula/functions/TestSubtotal.java
src/testcases/org/apache/poi/ss/formula/functions/TestSumif.java
src/testcases/org/apache/poi/ss/formula/functions/TestSumifs.java
src/testcases/org/apache/poi/ss/formula/functions/TestSumproduct.java
src/testcases/org/apache/poi/ss/formula/functions/TestTFunc.java
src/testcases/org/apache/poi/ss/formula/functions/TestText.java
src/testcases/org/apache/poi/ss/formula/functions/TestTime.java
src/testcases/org/apache/poi/ss/formula/functions/TestTrim.java
src/testcases/org/apache/poi/ss/formula/functions/TestTrunc.java
src/testcases/org/apache/poi/ss/formula/functions/TestValue.java
src/testcases/org/apache/poi/ss/formula/functions/TestXYNumericFunction.java
src/testcases/org/apache/poi/ss/formula/ptg/TestArea3DPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestAreaErrPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestAreaPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestArrayPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestAttrPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestErrPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestExternalFunctionFormulas.java
src/testcases/org/apache/poi/ss/formula/ptg/TestExternalNameReference.java
src/testcases/org/apache/poi/ss/formula/ptg/TestFuncPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestFuncVarPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestIntersectionPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestPercentPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestRangePtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestRef3DPtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestReferencePtg.java
src/testcases/org/apache/poi/ss/formula/ptg/TestUnionPtg.java
src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java
src/testcases/org/apache/poi/ss/usermodel/TestHSSFBorderStyle.java
src/testcases/org/apache/poi/ss/usermodel/TestIndexedColors.java
src/testcases/org/apache/poi/ss/util/TestCellAddress.java
src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java
src/testcases/org/apache/poi/ss/util/TestCellRangeUtil.java
src/testcases/org/apache/poi/ss/util/TestCellReference.java
src/testcases/org/apache/poi/ss/util/TestDateFormatConverter.java
src/testcases/org/apache/poi/ss/util/TestExpandedDouble.java
src/testcases/org/apache/poi/ss/util/TestNumberComparer.java
src/testcases/org/apache/poi/ss/util/TestNumberToTextConverter.java
src/testcases/org/apache/poi/ss/util/TestPropertyTemplate.java
src/testcases/org/apache/poi/ss/util/TestRegionUtil.java
src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java
src/testcases/org/apache/poi/ss/util/TestSheetUtil.java
src/testcases/org/apache/poi/ss/util/TestWorkbookUtil.java
src/testcases/org/apache/poi/util/TestBitField.java
src/testcases/org/apache/poi/util/TestByteField.java
src/testcases/org/apache/poi/util/TestIOUtils.java
src/testcases/org/apache/poi/util/TestIntList.java
src/testcases/org/apache/poi/util/TestIntegerField.java
src/testcases/org/apache/poi/util/TestLittleEndian.java
src/testcases/org/apache/poi/util/TestLittleEndianStreams.java
src/testcases/org/apache/poi/util/TestLongField.java
src/testcases/org/apache/poi/util/TestPOILogFactory.java
src/testcases/org/apache/poi/util/TestShortField.java

index e67ef0976dee74ab1c6783de40297079eaae6a2a..2902144fdeb78d538afa50c993b837641c7f7184 100644 (file)
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public class TestExcelAntPrecision {
+class TestExcelAntPrecision {
 
        private ExcelAntPrecision fixture ;
 
index eb7c0cac67b44fac3b29b875be1a41c078d86221..42f6cd256c536247bdea41a964729a0685cc3044 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public class TestExcelAntSet {
+class TestExcelAntSet {
 
 
        // This is abstract in nature, so we'll use a
index c2e246319c1f20a3a4b42f6bbd98dc182a32110a..45c4f536355da7797c3596f92e050b942768b5f4 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public class TestExcelAntSetDoubleCell {
+class TestExcelAntSetDoubleCell {
 
        private ExcelAntSetDoubleCell fixture ;
 
index c8df0a55aaabeabb9b9672107db7c8d6cd135fc9..52b580ac6f18a977f121b84b059ee77ff472da97 100644 (file)
@@ -22,7 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public class TestExcelAntUserDefinedFunction {
+class TestExcelAntUserDefinedFunction {
 
        private ExcelAntUserDefinedFunctionTestHelper fixture ;
 
index aea7208ea1272a007464041d40e3c97379f9d77f..dcb044a2eb24761bc4c743c67c413a6fa3ea6b08 100644 (file)
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public class TestExcelAntEvaluationResult {
+class TestExcelAntEvaluationResult {
        private ExcelAntEvaluationResult fixture;
 
        private boolean completedWithError;
index 8d6fb4599038e86eba58555a5e6502e92107a0fd..4f46084c6a9c43bdc31e9574dfc21d91bf01ed13 100644 (file)
@@ -40,7 +40,7 @@ import org.apache.tools.ant.BuildException;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Test;
 
-public class TestExcelAntWorkbookUtil {
+class TestExcelAntWorkbookUtil {
 
     private static final String mortgageCalculatorFileName =
         TestBuildFile.getDataDir() + "/spreadsheet/excelant.xls" ;
index 5c160e2ecb9b43e4545ba7057943cbcc7237974e..26e700fa8b1faa88dca53a0349bf34494cd2512b 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for the ExcelAntWorbookUtilFactory.
  */
-public class TestExcelAntWorkbookUtilFactory {
+class TestExcelAntWorkbookUtilFactory {
 
     private static final String mortgageCalculatorWorkbookFile =
         TestBuildFile.getDataDir() + "/spreadsheet/mortgage-calculation.xls" ;
index a9d5f8e6db1b47b86f80ffc9a1999181ce1e7c92..bff0cb1ba8bb963a9c5b950b8003f27f7ef99c53 100644 (file)
@@ -29,6 +29,7 @@ import java.util.zip.ZipException;
 import org.apache.poi.EncryptedDocumentException;
 import org.apache.poi.OldFileFormatException;
 import org.apache.poi.poifs.filesystem.OfficeXmlFileException;
+import org.junit.jupiter.api.Test;
 
 /**
  * This class is used for mass-regression testing via a
@@ -37,7 +38,7 @@ import org.apache.poi.poifs.filesystem.OfficeXmlFileException;
  * types of files/exceptions, e.g. old file formats.
  *
  */
-public class BaseIntegrationTest {
+class BaseIntegrationTest {
        private final File rootDir;
        private final String file;
        private FileHandler handler;
@@ -48,7 +49,8 @@ public class BaseIntegrationTest {
                this.handler = handler;
        }
 
-       public void test() throws Exception {
+       @Test
+       void test() throws Exception {
         assertNotNull( handler, "Unknown file extension for file: " + file + ": " + TestAllFiles.getExtension(file) );
                testOneFile(new File(rootDir, file));
        }
index 8fb6c65827c4540d8fa26c3649ea34a760718646..1d2ca65d4ce592d3b39cb3639d533d1ba83d0fc1 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.poi.hdgf.streams.TrailerStream;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.junit.jupiter.api.Test;
 
-public class HDGFFileHandler extends POIFSFileHandler {
+class HDGFFileHandler extends POIFSFileHandler {
        @Override
        public void handleFile(InputStream stream, String path) throws IOException {
            POIFSFileSystem poifs = new POIFSFileSystem(stream);
@@ -54,7 +54,7 @@ public class HDGFFileHandler extends POIFSFileHandler {
        // a test-case to test this locally without executing the full TestAllFiles
        @Override
     @Test
-       public void test() throws Exception {
+       void test() throws Exception {
         File file = new File("test-data/diagram/44501.vsd");
 
         InputStream stream = new FileInputStream(file);
index 91071adc236d5f90b34c5eda6ab0479953c4592f..34cf9ee5b9e5c64e8c418ec1cd94dcb3f4826b96 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.poi.poifs.filesystem.FileMagic;
 import org.apache.poi.util.LittleEndian;
 import org.junit.jupiter.api.Test;
 
-public class HMEFFileHandler extends AbstractFileHandler {
+class HMEFFileHandler extends AbstractFileHandler {
 
        @Override
        public void handleExtracting(File file) throws Exception {
@@ -64,7 +64,7 @@ public class HMEFFileHandler extends AbstractFileHandler {
 
        // a test-case to test this locally without executing the full TestAllFiles
        @Test
-       public void test() throws Exception {
+       void test() throws Exception {
            String path = "test-data/hmef/quick-winmail.dat";
                try (InputStream stream = new FileInputStream(path)) {
                        handleFile(stream, path);
index a1152d58d457756d2884d1be83a9591b8a935405..419840d69683bdbd0150d953bc6a74f01caf3a24 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.hpbf.extractor.PublisherTextExtractor;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.junit.jupiter.api.Test;
 
-public class HPBFFileHandler extends POIFSFileHandler {
+class HPBFFileHandler extends POIFSFileHandler {
        @Override
        public void handleFile(InputStream stream, String path) throws Exception {
                HPBFDocument pub = new HPBFDocument(new POIFSFileSystem(stream));
@@ -42,7 +42,7 @@ public class HPBFFileHandler extends POIFSFileHandler {
        // a test-case to test this locally without executing the full TestAllFiles
        @Override
     @Test
-       public void test() throws Exception {
+       void test() throws Exception {
         File file = new File("test-data/publisher/SampleBrochure.pub");
 
         InputStream stream = new FileInputStream(file);
index aafb700982c3d80d46f7ecf90cea7d6bbef63ee7..65ee09b42862102752925f6bf0c9967b22832d06 100644 (file)
@@ -43,7 +43,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.apache.poi.util.TempFile;
 import org.junit.jupiter.api.Test;
 
-public class HPSFFileHandler extends POIFSFileHandler {
+class HPSFFileHandler extends POIFSFileHandler {
     private static final String NL = System.getProperty("line.separator");
 
     private static File copyOutput;
@@ -120,7 +120,7 @@ public class HPSFFileHandler extends POIFSFileHandler {
        @Override
     @Test
     @SuppressWarnings("java:S2699")
-       public void test() throws Exception {
+       void test() throws Exception {
            String path = "test-data/diagram/44501.vsd";
         try (InputStream stream = new FileInputStream(path)) {
             handleFile(stream, path);
@@ -129,7 +129,7 @@ public class HPSFFileHandler extends POIFSFileHandler {
 
     // a test-case to test this locally without executing the full TestAllFiles
     @Test
-    public void testExtractor() {
+    void testExtractor() {
         File file = new File("test-data/hpsf/TestBug44375.xls");
         assertDoesNotThrow(() -> handleExtracting(file));
     }
index a4ae15b09095b23a77cb5eb5da650f056240fe04..3ea92dd0789e49e21cb17c6f0f6a5478a4e3c7a3 100644 (file)
@@ -29,7 +29,7 @@ import org.apache.poi.util.POILogger;
 import org.apache.poi.util.SystemOutLogger;
 import org.junit.jupiter.api.Test;
 
-public class HSLFFileHandler extends SlideShowHandler {
+class HSLFFileHandler extends SlideShowHandler {
     @Override
     public void handleFile(InputStream stream, String path) throws Exception {
         HSLFSlideShowImpl slide = new HSLFSlideShowImpl(stream);
@@ -51,14 +51,14 @@ public class HSLFFileHandler extends SlideShowHandler {
     }
 
     @Test
-    public void testOne() throws Exception {
+    void testOne() throws Exception {
         testOneFile(new File("test-data/slideshow/54880_chinese.ppt"));
     }
 
     // a test-case to test all .ppt files without executing the full TestAllFiles
     @Override
     @Test
-    public void test() throws Exception {
+    void test() throws Exception {
         File[] files = new File("test-data/slideshow/").listFiles((dir, name) -> name.endsWith(".ppt"));
         assertNotNull(files);
 
index 9fa3160cdaf178fde54447c26c60a5816996215d..8a21781bc45aef09f0b66c176f863f5e23d32682 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.hsmf.datatypes.AttachmentChunks;
 import org.apache.poi.hsmf.datatypes.DirectoryChunk;
 import org.junit.jupiter.api.Test;
 
-public class HSMFFileHandler extends POIFSFileHandler {
+class HSMFFileHandler extends POIFSFileHandler {
        @Override
        public void handleFile(InputStream stream, String path) throws Exception {
                MAPIMessage mapi = new MAPIMessage(stream);
@@ -77,7 +77,7 @@ public class HSMFFileHandler extends POIFSFileHandler {
        // a test-case to test this locally without executing the full TestAllFiles
        @Override
     @Test
-       public void test() throws Exception {
+       void test() throws Exception {
         File file = new File("test-data/hsmf/logsat.com_signatures_valid.msg");
                try (InputStream stream = new FileInputStream(file)) {
                        handleFile(stream, file.getPath());
index 1069f23c25efbbc785dd101a3170f6a148b451d0..9ee54b4790e566e982b8d06cf1d3dea2a47bfca1 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.util.NullPrintStream;
 import org.junit.jupiter.api.Test;
 
-public class HSSFFileHandler extends SpreadsheetHandler {
+class HSSFFileHandler extends SpreadsheetHandler {
        private final POIFSFileHandler delegate = new POIFSFileHandler();
        @Override
     public void handleFile(InputStream stream, String path) throws Exception {
@@ -106,7 +106,7 @@ public class HSSFFileHandler extends SpreadsheetHandler {
 
        // a test-case to test this locally without executing the full TestAllFiles
        @Test
-       public void test() throws Exception {
+       void test() throws Exception {
         File file = new File("test-data/spreadsheet/49219.xls");
 
                try (InputStream stream = new FileInputStream(file)) {
@@ -121,7 +121,7 @@ public class HSSFFileHandler extends SpreadsheetHandler {
        // a test-case to test this locally without executing the full TestAllFiles
     @Test
        @SuppressWarnings("java:S2699")
-    public void testExtractor() throws Exception {
+    void testExtractor() throws Exception {
         handleExtracting(new File("test-data/spreadsheet/BOOK_in_capitals.xls"));
     }
 }
\ No newline at end of file
index 24b30e8abd854f1e876ae7d5f990d1173aea3df8..e4bada54d457eead968895db03701a76e72486b3 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
  * Needs to be implemented in this package to have access to
  * HSSFWorkbook.getWorkbook()
  */
-public class HSSFRecordsStresser {
+class HSSFRecordsStresser {
     public static void handleWorkbook(HSSFWorkbook wb) {
         List<org.apache.poi.hssf.record.Record> records = wb.getWorkbook().getRecords();
         for(org.apache.poi.hssf.record.Record record : records) {
@@ -65,7 +65,7 @@ public class HSSFRecordsStresser {
 
     // a test-case to test this locally without executing the full TestAllFiles
     @Test
-    public void test() throws Exception {
+    void test() throws Exception {
         try (InputStream stream = new FileInputStream(HSSFTestDataSamples.getSampleFile("15556.xls"))) {
             HSSFWorkbook wb = new HSSFWorkbook(stream);
             handleWorkbook(wb);
index 260489c73e34271760eb8105153016aeb61d45c6..da07a9b87bf64f0981ff6db352382dbfc625c702 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.poi.hwpf.model.PicturesTable;
 import org.apache.poi.hwpf.usermodel.Picture;
 import org.junit.jupiter.api.Test;
 
-public class HWPFFileHandler extends POIFSFileHandler {
+class HWPFFileHandler extends POIFSFileHandler {
     @Override
     public void handleFile(InputStream stream, String path) throws Exception {
         HWPFDocument doc = new HWPFDocument(stream);
@@ -49,7 +49,7 @@ public class HWPFFileHandler extends POIFSFileHandler {
     @Override
     @Test
     @SuppressWarnings("java:S2699")
-    public void test() throws Exception {
+    void test() throws Exception {
         File file = new File("test-data/document/52117.doc");
 
         try (InputStream stream = new FileInputStream(file)) {
@@ -65,7 +65,7 @@ public class HWPFFileHandler extends POIFSFileHandler {
     }
 
     @Test
-    public void testExtractingOld() {
+    void testExtractingOld() {
         File file = new File("test-data/document/52117.doc");
         assertDoesNotThrow(() -> handleExtracting(file));
     }
index 7746a37f490326e642950242670d3f04b9d158f4..c4f5485806e2ef425d8a6cd17176823a76cad3cd 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.xwpf.usermodel.XWPFRelation;
 import org.junit.jupiter.api.Test;
 
-public class OPCFileHandler extends AbstractFileHandler {
+class OPCFileHandler extends AbstractFileHandler {
        @Override
     public void handleFile(InputStream stream, String path) throws Exception {
         // ignore password protected files
@@ -61,7 +61,7 @@ public class OPCFileHandler extends AbstractFileHandler {
 
        // a test-case to test this locally without executing the full TestAllFiles
        @Test
-       public void test() throws Exception {
+       void test() throws Exception {
         File file = new File("test-data/diagram/test.vsdx");
 
         try (InputStream stream = new PushbackInputStream(new FileInputStream(file), 100000)) {
index 99843096cd36ded0e5c51210cfe3bfed0d136902..b92f91f5f9022a299d4d1ab8803bd1d60f03d681 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.junit.jupiter.api.Test;
 
-public class POIFSFileHandler extends AbstractFileHandler {
+class POIFSFileHandler extends AbstractFileHandler {
 
        @Override
     public void handleFile(InputStream stream, String path) throws Exception {
@@ -69,7 +69,7 @@ public class POIFSFileHandler extends AbstractFileHandler {
 
     // a test-case to test this locally without executing the full TestAllFiles
     @Test
-    public void test() throws Exception {
+    void test() throws Exception {
         File file = new File("test-data/poifs/Notes.ole2");
 
         try (InputStream stream = new FileInputStream(file)) {
index 6d235f156613419a8846e76315426c3e962b31d0..b0703d3dc45fae31397149209a3c0be2e9a7027b 100644 (file)
@@ -49,7 +49,7 @@ import org.junit.jupiter.api.Test;
  *
  * Can also be used to get the appropriate FileHandler for a single file.
  */
-public class POIFileScanner {
+class POIFileScanner {
     private final static File ROOT_DIR;
     static {
         // when running in Gradle, current directory might be "build/integrationtest"
@@ -195,7 +195,7 @@ public class POIFileScanner {
     @Disabled
     @Test
     @SuppressForbidden("Just an ignored test")
-    public void testInvalidFile() throws IOException, InterruptedException {
+    void testInvalidFile() throws IOException, InterruptedException {
         FileHandler fileHandler = POIFileScanner.getFileHandler(new File("/usbc/CommonCrawl"),
                 "www.bgs.ac.uk_downloads_directdownload.cfm_id=2362&noexcl=true&t=west_20sussex_20-_20building_20stone_20quarries");
 
@@ -210,13 +210,13 @@ public class POIFileScanner {
     }
 
     @Test
-    public void testDetectUnnamedFile() throws IOException {
+    void testDetectUnnamedFile() throws IOException {
         File root = new File(ROOT_DIR, "spreadsheet");
         assertDoesNotThrow(() -> POIFileScanner.detectUnnamedFile(root, "49156.xlsx"));
     }
 
     @Test
-    public void test() throws IOException {
+    void test() throws IOException {
         assertDoesNotThrow(() -> POIFileScanner.scan(ROOT_DIR));
     }
 }
index bd52eddef5ea305d26225382b9ec00fbd65076e2..bc5d7abf610b39e57d556c831d900e839389d4d0 100644 (file)
@@ -68,7 +68,7 @@ import org.opentest4j.TestAbortedException;
  *  here as well! This is to ensure that files that should not work really do not work, e.g.
  *  that we do not remove expected sanity checks.
  */
-public class TestAllFiles {
+class TestAllFiles {
     private static final File ROOT_DIR = new File("test-data");
     private static final boolean IGNORE_SCRATCHPAD = Boolean.getBoolean("scratchpad.ignore");
 
@@ -384,7 +384,7 @@ public class TestAllFiles {
     // ... even when using a custom display name generator
     @ParameterizedTest(name = "#{index} {0}" )
     @MethodSource("files")
-    public void testAllFiles(String file, FileHandler handler) throws Exception {
+    void testAllFiles(String file, FileHandler handler) throws Exception {
         assertNotNull(handler, "Did not find a handler for file " + file);
 
         // this also removes the password for non encrypted files
index b48a8bafefbc15f37d5d35e04c5bfb775e2d696f..d588e4b49621946ff9f18a316d815e9deb5395b6 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.openxml4j.opc.PackageAccess;
 import org.apache.poi.xdgf.usermodel.XmlVisioDocument;
 import org.junit.jupiter.api.Test;
 
-public class XDGFFileHandler extends AbstractFileHandler {
+class XDGFFileHandler extends AbstractFileHandler {
     @Override
     public void handleFile(InputStream stream, String path) throws Exception {
         // ignore password protected files
@@ -36,7 +36,7 @@ public class XDGFFileHandler extends AbstractFileHandler {
     // a test-case to test this locally without executing the full TestAllFiles
     @Test
     @SuppressWarnings("java:S2699")
-    public void test() throws Exception {
+    void test() throws Exception {
         try (OPCPackage pkg = OPCPackage.open("test-data/diagram/test.vsdx", PackageAccess.READ)) {
             XmlVisioDocument doc = new XmlVisioDocument(pkg);
             new POIXMLDocumentHandler().handlePOIXMLDocument(doc);
index 6c54be4f7e8534aec7c3f6202dde9e485a6a47a6..da83b558232ae091f56d82996e75d82eb8d8ae28 100644 (file)
@@ -29,7 +29,7 @@ import org.apache.poi.xslf.usermodel.XMLSlideShow;
 import org.apache.poi.xslf.usermodel.XSLFSlideShow;
 import org.junit.jupiter.api.Test;
 
-public class XSLFFileHandler extends SlideShowHandler {
+class XSLFFileHandler extends SlideShowHandler {
        @Override
     public void handleFile(InputStream stream, String path) throws Exception {
            XMLSlideShow slide = new XMLSlideShow(stream);
@@ -71,7 +71,7 @@ public class XSLFFileHandler extends SlideShowHandler {
     // a test-case to test this locally without executing the full TestAllFiles
        @Override
     @Test
-       public void test() throws Exception {
+       void test() throws Exception {
         File file = new File("test-data/slideshow/ca.ubc.cs.people_~emhill_presentations_HowWeRefactor.pptx");
                try (InputStream stream = new FileInputStream(file)) {
                        handleFile(stream, file.getPath());
index d2e4df1191eb1510934d1f3154862cccb8d41547..1bc23c49ed21581612c3bd7edd6a43723e95e72c 100644 (file)
 ==================================================================== */
 package org.apache.poi.stress;
 
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
 
 import org.apache.poi.openxml4j.opc.OPCPackage;
 import org.apache.poi.openxml4j.opc.PackageAccess;
@@ -26,7 +31,7 @@ import org.apache.poi.xssf.extractor.XSSFBEventBasedExcelExtractor;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.junit.jupiter.api.Test;
 
-public class XSSFBFileHandler extends AbstractFileHandler {
+class XSSFBFileHandler extends AbstractFileHandler {
 
     static {
         //add expected failures here:
@@ -81,7 +86,7 @@ public class XSSFBFileHandler extends AbstractFileHandler {
     }
 
     @Test
-    public void testLocal() throws Exception {
+    void testLocal() throws Exception {
         File file = new File("test-data/spreadsheet/Simple.xlsb");
         try (FileInputStream stream = new FileInputStream(file)) {
             handleFile(stream, file.getPath());
index ec060dee056a9902da2ddea77067b7d62833c1cb..68f07b55be474783dff18e85e0b921f304912c3e 100644 (file)
@@ -57,7 +57,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.junit.jupiter.api.Test;
 import org.xml.sax.SAXException;
 
-public class XSSFFileHandler extends SpreadsheetHandler {
+class XSSFFileHandler extends SpreadsheetHandler {
     @Override
     public void handleFile(InputStream stream, String path) throws Exception {
         // ignore password protected files if password is unknown
@@ -205,7 +205,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
 
     // a test-case to test this locally without executing the full TestAllFiles
     @Test
-    public void test() throws Exception {
+    void test() throws Exception {
         File file = new File("test-data/spreadsheet/ref-56737.xlsx");
 
         try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
@@ -216,7 +216,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
     }
 
     @Test
-    public void testAdditional() throws Exception {
+    void testAdditional() throws Exception {
         handleAdditional(new File("test-data/spreadsheet/poc-xmlbomb.xlsx"));
     }
 }
index 92bfabbc493826ba8ae839c76495fdeb115737a3..c688c547586e06d5409d941752b8917024b2873d 100644 (file)
@@ -24,7 +24,7 @@ import java.io.InputStream;
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
 import org.junit.jupiter.api.Test;
 
-public class XWPFFileHandler extends AbstractFileHandler {
+class XWPFFileHandler extends AbstractFileHandler {
     @Override
     public void handleFile(InputStream stream, String path) throws Exception {
         // ignore password protected files
@@ -38,7 +38,7 @@ public class XWPFFileHandler extends AbstractFileHandler {
     // a test-case to test this locally without executing the full TestAllFiles
     @Test
     @SuppressWarnings("java:S2699")
-    public void test() throws Exception {
+    void test() throws Exception {
         File file = new File("test-data/document/51921-Word-Crash067.docx");
 
         try (InputStream stream = new BufferedInputStream(new FileInputStream(file))) {
index 5dff7e4feb7fc138c4af41301f9ae4af0367ee04..b07b7079b73308a4a50c87b8f6a9152df3fff6f9 100644 (file)
@@ -24,4 +24,6 @@ module org.apache.poi.stress {
     requires org.apache.poi.examples;
 
     exports org.apache.poi.stress;
+
+    opens org.apache.poi.stress to org.junit.platform.commons;
 }
\ No newline at end of file
diff --git a/src/ooxml/testcases/org/apache/poi/ss/tests/formula/functions/CountifsTests.java b/src/ooxml/testcases/org/apache/poi/ss/tests/formula/functions/CountifsTests.java
deleted file mode 100644 (file)
index 83aae9b..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-
-package org.apache.poi.ss.tests.formula.functions;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.ss.usermodel.CellValue;
-import org.apache.poi.ss.usermodel.FormulaEvaluator;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.ss.util.SheetUtil;
-import org.apache.poi.util.IOUtils;
-import org.apache.poi.xssf.XSSFTestDataSamples;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-/**
- * Test the COUNTIFS() function
- */
-public class CountifsTests {
-
-    private Workbook workbook;
-
-    /**
-     * initialize a workbook
-     */
-    @BeforeEach
-    void before() {
-        // not sure why we allow this, COUNTIFS() is only available
-        // in OOXML, it was introduced with Office 2007
-        workbook = new HSSFWorkbook();
-    }
-
-    /**
-     * Close the workbook if needed
-     */
-    @AfterEach
-    void after() {
-        IOUtils.closeQuietly(workbook);
-    }
-
-    /**
-     * Basic call
-     */
-    @Test
-    void testCallFunction() {
-        Sheet sheet = workbook.createSheet("test");
-        Row row1 = sheet.createRow(0);
-        Cell cellA1 = row1.createCell(0, CellType.FORMULA);
-        Cell cellB1 = row1.createCell(1, CellType.NUMERIC);
-        Cell cellC1 = row1.createCell(2, CellType.NUMERIC);
-        Cell cellD1 = row1.createCell(3, CellType.NUMERIC);
-        Cell cellE1 = row1.createCell(4, CellType.NUMERIC);
-        cellB1.setCellValue(1);
-        cellC1.setCellValue(1);
-        cellD1.setCellValue(2);
-        cellE1.setCellValue(4);
-
-        cellA1.setCellFormula("COUNTIFS(B1:C1,1, D1:E1,2)");
-        FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
-        CellValue evaluate = evaluator.evaluate(cellA1);
-        assertEquals(1.0d, evaluate.getNumberValue(), 0.000000000000001);
-    }
-
-    /**
-     * Test argument count check
-     */
-    @Test
-    void testCallFunction_invalidArgs() {
-        Sheet sheet = workbook.createSheet("test");
-        Row row1 = sheet.createRow(0);
-        Cell cellA1 = row1.createCell(0, CellType.FORMULA);
-        cellA1.setCellFormula("COUNTIFS()");
-        FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
-        CellValue evaluate = evaluator.evaluate(cellA1);
-        assertEquals(15, evaluate.getErrorValue());
-        cellA1.setCellFormula("COUNTIFS(A1:C1)");
-        evaluator = workbook.getCreationHelper().createFormulaEvaluator();
-        evaluate = evaluator.evaluate(cellA1);
-        assertEquals(15, evaluate.getErrorValue());
-        cellA1.setCellFormula("COUNTIFS(A1:C1,2,2)");
-        evaluator = workbook.getCreationHelper().createFormulaEvaluator();
-        evaluate = evaluator.evaluate(cellA1);
-        assertEquals(15, evaluate.getErrorValue());
-    }
-
-    /**
-     * the bug returned the wrong count, this verifies the fix
-     */
-    @Test
-    void testBug56822() {
-        workbook = XSSFTestDataSamples.openSampleWorkbook("56822-Countifs.xlsx");
-        FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
-        Cell cell = SheetUtil.getCell(workbook.getSheetAt(0), 0, 3);
-        assertNotNull(cell, "Test workbook missing cell D1");
-        CellValue evaluate = evaluator.evaluate(cell);
-        assertEquals(2.0d, evaluate.getNumberValue(), 0.00000000000001);
-    }
-}
diff --git a/src/ooxml/testcases/org/apache/poi/ss/tests/formula/functions/TestCountifs.java b/src/ooxml/testcases/org/apache/poi/ss/tests/formula/functions/TestCountifs.java
new file mode 100644 (file)
index 0000000..902de11
--- /dev/null
@@ -0,0 +1,121 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
+
+package org.apache.poi.ss.tests.formula.functions;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.CellValue;
+import org.apache.poi.ss.usermodel.FormulaEvaluator;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.util.SheetUtil;
+import org.apache.poi.util.IOUtils;
+import org.apache.poi.xssf.XSSFTestDataSamples;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test the COUNTIFS() function
+ */
+class TestCountifs {
+
+    private Workbook workbook;
+
+    /**
+     * initialize a workbook
+     */
+    @BeforeEach
+    void before() {
+        // not sure why we allow this, COUNTIFS() is only available
+        // in OOXML, it was introduced with Office 2007
+        workbook = new HSSFWorkbook();
+    }
+
+    /**
+     * Close the workbook if needed
+     */
+    @AfterEach
+    void after() {
+        IOUtils.closeQuietly(workbook);
+    }
+
+    /**
+     * Basic call
+     */
+    @Test
+    void testCallFunction() {
+        Sheet sheet = workbook.createSheet("test");
+        Row row1 = sheet.createRow(0);
+        Cell cellA1 = row1.createCell(0, CellType.FORMULA);
+        Cell cellB1 = row1.createCell(1, CellType.NUMERIC);
+        Cell cellC1 = row1.createCell(2, CellType.NUMERIC);
+        Cell cellD1 = row1.createCell(3, CellType.NUMERIC);
+        Cell cellE1 = row1.createCell(4, CellType.NUMERIC);
+        cellB1.setCellValue(1);
+        cellC1.setCellValue(1);
+        cellD1.setCellValue(2);
+        cellE1.setCellValue(4);
+
+        cellA1.setCellFormula("COUNTIFS(B1:C1,1, D1:E1,2)");
+        FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
+        CellValue evaluate = evaluator.evaluate(cellA1);
+        assertEquals(1.0d, evaluate.getNumberValue(), 0.000000000000001);
+    }
+
+    /**
+     * Test argument count check
+     */
+    @Test
+    void testCallFunction_invalidArgs() {
+        Sheet sheet = workbook.createSheet("test");
+        Row row1 = sheet.createRow(0);
+        Cell cellA1 = row1.createCell(0, CellType.FORMULA);
+        cellA1.setCellFormula("COUNTIFS()");
+        FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
+        CellValue evaluate = evaluator.evaluate(cellA1);
+        assertEquals(15, evaluate.getErrorValue());
+        cellA1.setCellFormula("COUNTIFS(A1:C1)");
+        evaluator = workbook.getCreationHelper().createFormulaEvaluator();
+        evaluate = evaluator.evaluate(cellA1);
+        assertEquals(15, evaluate.getErrorValue());
+        cellA1.setCellFormula("COUNTIFS(A1:C1,2,2)");
+        evaluator = workbook.getCreationHelper().createFormulaEvaluator();
+        evaluate = evaluator.evaluate(cellA1);
+        assertEquals(15, evaluate.getErrorValue());
+    }
+
+    /**
+     * the bug returned the wrong count, this verifies the fix
+     */
+    @Test
+    void testBug56822() {
+        workbook = XSSFTestDataSamples.openSampleWorkbook("56822-Countifs.xlsx");
+        FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
+        Cell cell = SheetUtil.getCell(workbook.getSheetAt(0), 0, 3);
+        assertNotNull(cell, "Test workbook missing cell D1");
+        CellValue evaluate = evaluator.evaluate(cell);
+        assertEquals(2.0d, evaluate.getNumberValue(), 0.00000000000001);
+    }
+}
diff --git a/src/ooxml/testcases/org/apache/poi/ss/tests/usermodel/ConditionalFormattingEvalTest.java b/src/ooxml/testcases/org/apache/poi/ss/tests/usermodel/ConditionalFormattingEvalTest.java
deleted file mode 100644 (file)
index d740699..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.ss.tests.usermodel;
-
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertNotEquals;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.poi.ss.formula.ConditionalFormattingEvaluator;
-import org.apache.poi.ss.formula.EvaluationConditionalFormatRule;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.Color;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.util.CellReference;
-import org.apache.poi.util.IOUtils;
-import org.apache.poi.xssf.XSSFTestDataSamples;
-import org.apache.poi.xssf.usermodel.XSSFColor;
-import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-public class ConditionalFormattingEvalTest {
-
-    private XSSFWorkbook wb;
-    private Sheet sheet;
-    private XSSFFormulaEvaluator formulaEval;
-    private ConditionalFormattingEvaluator cfe;
-    private CellReference ref;
-    private List<EvaluationConditionalFormatRule> rules;
-
-    @BeforeEach
-    void openWB() {
-        wb = XSSFTestDataSamples.openSampleWorkbook("ConditionalFormattingSamples.xlsx");
-        formulaEval = new XSSFFormulaEvaluator(wb);
-        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
-    }
-
-    @AfterEach
-    void closeWB() {
-        formulaEval = null;
-        cfe = null;
-        ref = null;
-        rules = null;
-        IOUtils.closeQuietly(wb);
-    }
-
-    @Test
-    void testFormattingEvaluation() {
-        sheet = wb.getSheet("Products1");
-
-        getRulesFor(12, 1);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        assertEquals("FFFFEB9C", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
-        assertFalse(rules.get(0).getRule().getFontFormatting().isItalic(), "should not be italic " + ref);
-
-        getRulesFor(16, 3);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        assertEquals(0.7999816888943144d, getTint(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), 0.000000000000001, "wrong bg color for " + ref);
-
-        getRulesFor(12, 3);
-        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
-
-        sheet = wb.getSheet("Products2");
-
-        getRulesFor(15,1);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        assertEquals("FFFFEB9C", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
-
-        getRulesFor(20,3);
-        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
-
-        // now change a cell value that's an input for the rules
-        Cell cell = sheet.getRow(1).getCell(6);
-        cell.setCellValue("Dairy");
-        formulaEval.notifyUpdateCell(cell);
-        cell = sheet.getRow(4).getCell(6);
-        cell.setCellValue(500);
-        formulaEval.notifyUpdateCell(cell);
-        // need to throw away all evaluations, since we don't know how value changes may have affected format formulas
-        cfe.clearAllCachedValues();
-
-        // test that the conditional validation evaluations changed
-        getRulesFor(15,1);
-        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
-
-        getRulesFor(20,3);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        assertEquals(0.7999816888943144d, getTint(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), 0.000000000000001, "wrong bg color for " + ref);
-
-        getRulesFor(20,1);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        assertEquals("FFFFEB9C", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
-
-        sheet = wb.getSheet("Book tour");
-
-        getRulesFor(8,2);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-
-        sheet = wb.getSheet("Compare to totals");
-        getRulesFor(3, 2);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        assertEquals("FFFF0000", getColor(rules.get(0).getRule().getFontFormatting().getFontColor()), "wrong fg color for " + ref);
-        getRulesFor(3, 3);
-        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
-        getRulesFor(15, 4);
-        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
-        getRulesFor(16, 1);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        assertEquals("FFFF0000", getColor(rules.get(0).getRule().getFontFormatting().getFontColor()), "wrong fg color for " + ref);
-
-        sheet = wb.getSheet("Products3");
-        sheet.getRow(8).getCell(0).setCellValue(new Date());
-        getRulesFor(8, 0);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-        getRulesFor(8, 3);
-        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
-
-        sheet = wb.getSheet("Customers2");
-        getRulesFor(3, 0);
-        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
-    }
-
-    @Test
-    void testFormattingOnUndefinedCell() {
-        wb = XSSFTestDataSamples.openSampleWorkbook("conditional_formatting_with_formula_on_second_sheet.xlsx");
-        formulaEval = new XSSFFormulaEvaluator(wb);
-        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
-
-        sheet = wb.getSheet("Sales Plan");
-        getRulesFor(9,2);
-        assertNotEquals(0, rules.size(), "No rules for " + ref);
-        assertEquals("FFFFFF00", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
-    }
-
-    @Test
-    void testRepeatedEval() {
-        wb = XSSFTestDataSamples.openSampleWorkbook("test_conditional_formatting.xlsx");
-        formulaEval = new XSSFFormulaEvaluator(wb);
-        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
-
-        sheet = wb.getSheetAt(0);
-        assertEquals(0, getRulesFor(2, 1).size(), "no rules should apply");
-
-        assertEquals(0, getRulesFor(2, 1).size(), "no rules should apply");
-
-    }
-
-    @Test
-    void testCellValueIsWrongType() {
-        wb = XSSFTestDataSamples.openSampleWorkbook("conditional_formatting_cell_is.xlsx");
-        formulaEval = new XSSFFormulaEvaluator(wb);
-        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
-
-        sheet = wb.getSheetAt(1);
-
-        assertEquals(1, getRulesFor(3, 1).size(), "wrong # of matching rules");
-    }
-
-    @Test
-    void testRangeCondition() {
-        wb = XSSFTestDataSamples.openSampleWorkbook("conditional_formatting_multiple_ranges.xlsx");
-        formulaEval = new XSSFFormulaEvaluator(wb);
-        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
-
-        sheet = wb.getSheetAt(0);
-
-        assertEquals(0, getRulesFor(0, 0).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(1, 0).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(2, 0).size(), "wrong # of matching rules");
-        assertEquals(1, getRulesFor(3, 0).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(0, 1).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(1, 1).size(), "wrong # of matching rules");
-        assertEquals(1, getRulesFor(2, 1).size(), "wrong # of matching rules");
-        assertEquals(1, getRulesFor(3, 1).size(), "wrong # of matching rules");
-        assertEquals(1, getRulesFor(0, 3).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(1, 3).size(), "wrong # of matching rules");
-        assertEquals(1, getRulesFor(2, 3).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(0, 6).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(3, 6).size(), "wrong # of matching rules");
-        assertEquals(0, getRulesFor(2, 6).size(), "wrong # of matching rules");
-    }
-
-    private List<EvaluationConditionalFormatRule> getRulesFor(int row, int col) {
-        ref = new CellReference(sheet.getSheetName(), row, col, false, false);
-        return rules = cfe.getConditionalFormattingForCell(ref);
-    }
-
-    private String getColor(Color color) {
-        final XSSFColor c = XSSFColor.toXSSFColor(color);
-        return c.getARGBHex();
-    }
-
-    private double getTint(Color color) {
-        final XSSFColor c = XSSFColor.toXSSFColor(color);
-        return c.getTint();
-    }
-}
diff --git a/src/ooxml/testcases/org/apache/poi/ss/tests/usermodel/TestConditionalFormattingEval.java b/src/ooxml/testcases/org/apache/poi/ss/tests/usermodel/TestConditionalFormattingEval.java
new file mode 100644 (file)
index 0000000..4e6257c
--- /dev/null
@@ -0,0 +1,218 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
+package org.apache.poi.ss.tests.usermodel;
+
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+
+import java.util.Date;
+import java.util.List;
+
+import org.apache.poi.ss.formula.ConditionalFormattingEvaluator;
+import org.apache.poi.ss.formula.EvaluationConditionalFormatRule;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Color;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.util.CellReference;
+import org.apache.poi.util.IOUtils;
+import org.apache.poi.xssf.XSSFTestDataSamples;
+import org.apache.poi.xssf.usermodel.XSSFColor;
+import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+class TestConditionalFormattingEval {
+
+    private XSSFWorkbook wb;
+    private Sheet sheet;
+    private XSSFFormulaEvaluator formulaEval;
+    private ConditionalFormattingEvaluator cfe;
+    private CellReference ref;
+    private List<EvaluationConditionalFormatRule> rules;
+
+    @BeforeEach
+    void openWB() {
+        wb = XSSFTestDataSamples.openSampleWorkbook("ConditionalFormattingSamples.xlsx");
+        formulaEval = new XSSFFormulaEvaluator(wb);
+        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
+    }
+
+    @AfterEach
+    void closeWB() {
+        formulaEval = null;
+        cfe = null;
+        ref = null;
+        rules = null;
+        IOUtils.closeQuietly(wb);
+    }
+
+    @Test
+    void testFormattingEvaluation() {
+        sheet = wb.getSheet("Products1");
+
+        getRulesFor(12, 1);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        assertEquals("FFFFEB9C", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
+        assertFalse(rules.get(0).getRule().getFontFormatting().isItalic(), "should not be italic " + ref);
+
+        getRulesFor(16, 3);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        assertEquals(0.7999816888943144d, getTint(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), 0.000000000000001, "wrong bg color for " + ref);
+
+        getRulesFor(12, 3);
+        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
+
+        sheet = wb.getSheet("Products2");
+
+        getRulesFor(15,1);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        assertEquals("FFFFEB9C", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
+
+        getRulesFor(20,3);
+        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
+
+        // now change a cell value that's an input for the rules
+        Cell cell = sheet.getRow(1).getCell(6);
+        cell.setCellValue("Dairy");
+        formulaEval.notifyUpdateCell(cell);
+        cell = sheet.getRow(4).getCell(6);
+        cell.setCellValue(500);
+        formulaEval.notifyUpdateCell(cell);
+        // need to throw away all evaluations, since we don't know how value changes may have affected format formulas
+        cfe.clearAllCachedValues();
+
+        // test that the conditional validation evaluations changed
+        getRulesFor(15,1);
+        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
+
+        getRulesFor(20,3);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        assertEquals(0.7999816888943144d, getTint(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), 0.000000000000001, "wrong bg color for " + ref);
+
+        getRulesFor(20,1);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        assertEquals("FFFFEB9C", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
+
+        sheet = wb.getSheet("Book tour");
+
+        getRulesFor(8,2);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+
+        sheet = wb.getSheet("Compare to totals");
+        getRulesFor(3, 2);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        assertEquals("FFFF0000", getColor(rules.get(0).getRule().getFontFormatting().getFontColor()), "wrong fg color for " + ref);
+        getRulesFor(3, 3);
+        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
+        getRulesFor(15, 4);
+        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
+        getRulesFor(16, 1);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        assertEquals("FFFF0000", getColor(rules.get(0).getRule().getFontFormatting().getFontColor()), "wrong fg color for " + ref);
+
+        sheet = wb.getSheet("Products3");
+        sheet.getRow(8).getCell(0).setCellValue(new Date());
+        getRulesFor(8, 0);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+        getRulesFor(8, 3);
+        assertEquals(1, rules.size(), "wrong # of rules for " + ref);
+
+        sheet = wb.getSheet("Customers2");
+        getRulesFor(3, 0);
+        assertEquals(0, rules.size(), "wrong # of rules for " + ref);
+    }
+
+    @Test
+    void testFormattingOnUndefinedCell() {
+        wb = XSSFTestDataSamples.openSampleWorkbook("conditional_formatting_with_formula_on_second_sheet.xlsx");
+        formulaEval = new XSSFFormulaEvaluator(wb);
+        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
+
+        sheet = wb.getSheet("Sales Plan");
+        getRulesFor(9,2);
+        assertNotEquals(0, rules.size(), "No rules for " + ref);
+        assertEquals("FFFFFF00", getColor(rules.get(0).getRule().getPatternFormatting().getFillBackgroundColorColor()), "wrong bg color for " + ref);
+    }
+
+    @Test
+    void testRepeatedEval() {
+        wb = XSSFTestDataSamples.openSampleWorkbook("test_conditional_formatting.xlsx");
+        formulaEval = new XSSFFormulaEvaluator(wb);
+        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
+
+        sheet = wb.getSheetAt(0);
+        assertEquals(0, getRulesFor(2, 1).size(), "no rules should apply");
+
+        assertEquals(0, getRulesFor(2, 1).size(), "no rules should apply");
+
+    }
+
+    @Test
+    void testCellValueIsWrongType() {
+        wb = XSSFTestDataSamples.openSampleWorkbook("conditional_formatting_cell_is.xlsx");
+        formulaEval = new XSSFFormulaEvaluator(wb);
+        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
+
+        sheet = wb.getSheetAt(1);
+
+        assertEquals(1, getRulesFor(3, 1).size(), "wrong # of matching rules");
+    }
+
+    @Test
+    void testRangeCondition() {
+        wb = XSSFTestDataSamples.openSampleWorkbook("conditional_formatting_multiple_ranges.xlsx");
+        formulaEval = new XSSFFormulaEvaluator(wb);
+        cfe = new ConditionalFormattingEvaluator(wb, formulaEval);
+
+        sheet = wb.getSheetAt(0);
+
+        assertEquals(0, getRulesFor(0, 0).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(1, 0).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(2, 0).size(), "wrong # of matching rules");
+        assertEquals(1, getRulesFor(3, 0).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(0, 1).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(1, 1).size(), "wrong # of matching rules");
+        assertEquals(1, getRulesFor(2, 1).size(), "wrong # of matching rules");
+        assertEquals(1, getRulesFor(3, 1).size(), "wrong # of matching rules");
+        assertEquals(1, getRulesFor(0, 3).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(1, 3).size(), "wrong # of matching rules");
+        assertEquals(1, getRulesFor(2, 3).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(0, 6).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(3, 6).size(), "wrong # of matching rules");
+        assertEquals(0, getRulesFor(2, 6).size(), "wrong # of matching rules");
+    }
+
+    private List<EvaluationConditionalFormatRule> getRulesFor(int row, int col) {
+        ref = new CellReference(sheet.getSheetName(), row, col, false, false);
+        return rules = cfe.getConditionalFormattingForCell(ref);
+    }
+
+    private String getColor(Color color) {
+        final XSSFColor c = XSSFColor.toXSSFColor(color);
+        return c.getARGBHex();
+    }
+
+    private double getTint(Color color) {
+        final XSSFColor c = XSSFColor.toXSSFColor(color);
+        return c.getTint();
+    }
+}
diff --git a/src/ooxml/testcases/org/apache/poi/xdgf/usermodel/section/CombinedIteratorTest.java b/src/ooxml/testcases/org/apache/poi/xdgf/usermodel/section/CombinedIteratorTest.java
deleted file mode 100644 (file)
index 03d739d..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.xdgf.usermodel.section;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.util.Iterator;
-import java.util.SortedMap;
-import java.util.TreeMap;
-
-import org.junit.jupiter.api.Test;
-
-public class CombinedIteratorTest {
-
-    void testIteration(CombinedIterable<String> iterable, String... expected) {
-
-        Iterator<String> iter = iterable.iterator();
-
-        for (String element : expected) {
-            assertTrue(iter.hasNext());
-            assertEquals(element, iter.next());
-        }
-
-        assertFalse(iter.hasNext());
-    }
-
-    @Test
-    void testNullMaster() {
-
-        SortedMap<Long, String> base = new TreeMap<>();
-        base.put(1L, "B1");
-        base.put(2L, "B2");
-        base.put(3L, "B3");
-
-        testIteration(new CombinedIterable<>(base, null), "B1", "B2",
-                "B3");
-    }
-
-    @Test
-    void testNoMatchesBaseFirst() {
-
-        SortedMap<Long, String> base = new TreeMap<>();
-        base.put(1L, "B1");
-        base.put(2L, "B2");
-        base.put(3L, "B3");
-
-        SortedMap<Long, String> master = new TreeMap<>();
-        master.put(4L, "M4");
-        master.put(5L, "M5");
-        master.put(6L, "M6");
-
-        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
-                "B3", "M4", "M5", "M6");
-    }
-
-    @Test
-    void testNoMatchesMasterFirst() {
-
-        SortedMap<Long, String> base = new TreeMap<>();
-        base.put(4L, "B4");
-        base.put(5L, "B5");
-        base.put(6L, "B6");
-
-        SortedMap<Long, String> master = new TreeMap<>();
-        master.put(1L, "M1");
-        master.put(2L, "M2");
-        master.put(3L, "M3");
-
-        testIteration(new CombinedIterable<>(base, master), "M1", "M2",
-                "M3", "B4", "B5", "B6");
-    }
-
-    @Test
-    void testInterleaved1() {
-
-        SortedMap<Long, String> base = new TreeMap<>();
-        base.put(1L, "B1");
-        base.put(3L, "B3");
-        base.put(5L, "B5");
-
-        SortedMap<Long, String> master = new TreeMap<>();
-        master.put(2L, "M2");
-        master.put(4L, "M4");
-        master.put(6L, "M6");
-
-        testIteration(new CombinedIterable<>(base, master), "B1", "M2",
-                "B3", "M4", "B5", "M6");
-    }
-
-    @Test
-    void testInterleaved2() {
-
-        SortedMap<Long, String> base = new TreeMap<>();
-        base.put(1L, "B1");
-        base.put(2L, "B2");
-        base.put(5L, "B5");
-        base.put(6L, "B6");
-
-        SortedMap<Long, String> master = new TreeMap<>();
-        master.put(3L, "M3");
-        master.put(4L, "M4");
-        master.put(7L, "M7");
-        master.put(8L, "M8");
-
-        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
-                "M3", "M4", "B5", "B6", "M7", "M8");
-    }
-
-    @Test
-    void testAllMatching() {
-
-        SortedMap<Long, String> base = new TreeMap<>();
-        base.put(1L, "B1");
-        base.put(2L, "B2");
-        base.put(3L, "B3");
-
-        SortedMap<Long, String> master = new TreeMap<>();
-        master.put(1L, "M1");
-        master.put(2L, "M2");
-        master.put(3L, "M3");
-
-        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
-                "B3");
-    }
-
-    @Test
-    void testAllMatching2() {
-
-        SortedMap<Long, String> base = new TreeMap<>();
-        base.put(1L, "B1");
-        base.put(2L, "B2");
-        base.put(3L, "B3");
-
-        SortedMap<Long, String> master = new TreeMap<>();
-        master.put(1L, "M1");
-        master.put(2L, "M2");
-        master.put(3L, "M3");
-        master.put(4L, "M4");
-
-        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
-                "B3", "M4");
-    }
-}
diff --git a/src/ooxml/testcases/org/apache/poi/xdgf/usermodel/section/TestCombinedIterator.java b/src/ooxml/testcases/org/apache/poi/xdgf/usermodel/section/TestCombinedIterator.java
new file mode 100644 (file)
index 0000000..5679c28
--- /dev/null
@@ -0,0 +1,160 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xdgf.usermodel.section;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.Iterator;
+import java.util.SortedMap;
+import java.util.TreeMap;
+
+import org.junit.jupiter.api.Test;
+
+class TestCombinedIterator {
+
+    void testIteration(CombinedIterable<String> iterable, String... expected) {
+
+        Iterator<String> iter = iterable.iterator();
+
+        for (String element : expected) {
+            assertTrue(iter.hasNext());
+            assertEquals(element, iter.next());
+        }
+
+        assertFalse(iter.hasNext());
+    }
+
+    @Test
+    void testNullMaster() {
+
+        SortedMap<Long, String> base = new TreeMap<>();
+        base.put(1L, "B1");
+        base.put(2L, "B2");
+        base.put(3L, "B3");
+
+        testIteration(new CombinedIterable<>(base, null), "B1", "B2",
+                "B3");
+    }
+
+    @Test
+    void testNoMatchesBaseFirst() {
+
+        SortedMap<Long, String> base = new TreeMap<>();
+        base.put(1L, "B1");
+        base.put(2L, "B2");
+        base.put(3L, "B3");
+
+        SortedMap<Long, String> master = new TreeMap<>();
+        master.put(4L, "M4");
+        master.put(5L, "M5");
+        master.put(6L, "M6");
+
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
+                "B3", "M4", "M5", "M6");
+    }
+
+    @Test
+    void testNoMatchesMasterFirst() {
+
+        SortedMap<Long, String> base = new TreeMap<>();
+        base.put(4L, "B4");
+        base.put(5L, "B5");
+        base.put(6L, "B6");
+
+        SortedMap<Long, String> master = new TreeMap<>();
+        master.put(1L, "M1");
+        master.put(2L, "M2");
+        master.put(3L, "M3");
+
+        testIteration(new CombinedIterable<>(base, master), "M1", "M2",
+                "M3", "B4", "B5", "B6");
+    }
+
+    @Test
+    void testInterleaved1() {
+
+        SortedMap<Long, String> base = new TreeMap<>();
+        base.put(1L, "B1");
+        base.put(3L, "B3");
+        base.put(5L, "B5");
+
+        SortedMap<Long, String> master = new TreeMap<>();
+        master.put(2L, "M2");
+        master.put(4L, "M4");
+        master.put(6L, "M6");
+
+        testIteration(new CombinedIterable<>(base, master), "B1", "M2",
+                "B3", "M4", "B5", "M6");
+    }
+
+    @Test
+    void testInterleaved2() {
+
+        SortedMap<Long, String> base = new TreeMap<>();
+        base.put(1L, "B1");
+        base.put(2L, "B2");
+        base.put(5L, "B5");
+        base.put(6L, "B6");
+
+        SortedMap<Long, String> master = new TreeMap<>();
+        master.put(3L, "M3");
+        master.put(4L, "M4");
+        master.put(7L, "M7");
+        master.put(8L, "M8");
+
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
+                "M3", "M4", "B5", "B6", "M7", "M8");
+    }
+
+    @Test
+    void testAllMatching() {
+
+        SortedMap<Long, String> base = new TreeMap<>();
+        base.put(1L, "B1");
+        base.put(2L, "B2");
+        base.put(3L, "B3");
+
+        SortedMap<Long, String> master = new TreeMap<>();
+        master.put(1L, "M1");
+        master.put(2L, "M2");
+        master.put(3L, "M3");
+
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
+                "B3");
+    }
+
+    @Test
+    void testAllMatching2() {
+
+        SortedMap<Long, String> base = new TreeMap<>();
+        base.put(1L, "B1");
+        base.put(2L, "B2");
+        base.put(3L, "B3");
+
+        SortedMap<Long, String> master = new TreeMap<>();
+        master.put(1L, "M1");
+        master.put(2L, "M2");
+        master.put(3L, "M3");
+        master.put(4L, "M4");
+
+        testIteration(new CombinedIterable<>(base, master), "B1", "B2",
+                "B3", "M4");
+    }
+}
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/TestXSSFMemoryLeak.java b/src/ooxml/testcases/org/apache/poi/xssf/TestXSSFMemoryLeak.java
new file mode 100644 (file)
index 0000000..bb98599
--- /dev/null
@@ -0,0 +1,167 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+
+package org.apache.poi.xssf;
+
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.poi.ooxml.POIXMLException;
+import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.openxml4j.opc.OPCPackage;
+import org.apache.poi.util.MemoryLeakVerifier;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFRow;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCell;
+
+/**
+ * A test which uses {@link MemoryLeakVerifier} to ensure that certain
+ * objects are not left over in memory after the test.
+ *
+ * E.g. verifies that objects are freed when stuff is removed from sheets or rows
+ */
+public class TestXSSFMemoryLeak {
+    private final MemoryLeakVerifier verifier = new MemoryLeakVerifier();
+
+    // keep some items in memory, so checks in tearDown() actually
+    // verify that they do not keep certain objects in memory,
+    // e.g. nested CT... objects which should be released
+    @SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
+    private final List<Object> references = new ArrayList<>();
+
+    @AfterEach
+    void tearDown() {
+        verifier.assertGarbageCollected();
+    }
+
+    @Test
+    void testWriteRow() throws IOException {
+        try (XSSFWorkbook wb = new XSSFWorkbook()) {
+            final XSSFSheet sheet1 = wb.createSheet("Sheet1");
+            final XSSFRow row = sheet1.createRow(0);
+            final XSSFCell cell = row.createCell(0);
+            cell.setCellValue("hello");
+
+            // Cannot check the CTCell here as it is reused now and thus
+            // not freed until we free up the Cell itself
+            //verifier.addObject(ctCell);
+
+            try (OutputStream out = new ByteArrayOutputStream(8192)) {
+                wb.write(out);
+            }
+
+            CTCell ctCell = cell.getCTCell();
+            assertSame(cell.getCTCell(), ctCell, "The CTCell should not be replaced");
+            assertSame(row.getCTRow().getCArray(0), ctCell, "The CTCell in the row should not be replaced");
+        }
+    }
+
+    @Test
+    void testRemoveCellFromRow() throws IOException {
+        try (XSSFWorkbook wb = new XSSFWorkbook()) {
+            final XSSFSheet sheet1 = wb.createSheet("Sheet1");
+            final XSSFRow rowToCheck = sheet1.createRow(0);
+            references.add(rowToCheck);
+
+            XSSFCell cell = rowToCheck.createCell(0);
+            cell.setCellValue("hello");
+
+            // previously the CTCell was still referenced in the CTRow, verify that it is freed
+            verifier.addObject(cell);
+            verifier.addObject(cell.getCTCell());
+
+            rowToCheck.removeCell(cell);
+
+            assertNull(rowToCheck.getCell(0));
+        }
+    }
+
+    @Test
+    void testRemove2CellsFromRow() throws IOException {
+        try (XSSFWorkbook wb = new XSSFWorkbook()) {
+            final XSSFSheet sheet1 = wb.createSheet("Sheet1");
+            final XSSFRow rowToCheck = sheet1.createRow(0);
+            references.add(rowToCheck);
+
+            XSSFCell cell1 = rowToCheck.createCell(0);
+            cell1.setCellValue("hello");
+            XSSFCell cell2 = rowToCheck.createCell(1);
+            cell2.setCellValue("world");
+
+            // previously the CTCell was still referenced in the CTRow, verify that it is freed
+            verifier.addObject(cell1);
+            verifier.addObject(cell1.getCTCell());
+            verifier.addObject(cell2);
+            verifier.addObject(cell2.getCTCell());
+
+            rowToCheck.removeCell(cell2);
+            rowToCheck.removeCell(cell1);
+
+            assertNull(rowToCheck.getCell(0));
+            assertNull(rowToCheck.getCell(1));
+        }
+    }
+
+    @Test
+    void testRemoveRowFromSheet() throws IOException {
+        try (XSSFWorkbook wb1 = new XSSFWorkbook()) {
+            final XSSFSheet sheetToCheck = wb1.createSheet("Sheet1");
+            references.add(sheetToCheck);
+            final XSSFRow row = sheetToCheck.createRow(0);
+            final XSSFCell cell = row.createCell(0);
+            cell.setCellValue(1);
+
+            // ensure that the row-data is not kept somewhere in another member
+            verifier.addObject(row.getCTRow());
+            verifier.addObject(row);
+            verifier.addObject(cell.getCTCell());
+            verifier.addObject(cell);
+
+            sheetToCheck.removeRow(row);
+
+            assertNull(sheetToCheck.getRow(0));
+        }
+    }
+
+    @Test
+    void testFileLeak() {
+        File file = XSSFTestDataSamples.getSampleFile("xlsx-corrupted.xlsx");
+        verifier.addObject(file);
+        assertThrows(POIXMLException.class, () -> new XSSFWorkbook(file), "Should catch exception as the file is corrupted");
+    }
+
+    @Test
+    void testFileLeak2() throws IOException, InvalidFormatException {
+        File file = XSSFTestDataSamples.getSampleFile("xlsx-corrupted.xlsx");
+        verifier.addObject(file);
+        try (OPCPackage pkg = OPCPackage.open(file)) {
+            assertThrows(POIXMLException.class, () -> new XSSFWorkbook(pkg), "Should catch exception as the file is corrupted");
+        }
+    }
+}
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/XSSFMemoryLeakTests.java b/src/ooxml/testcases/org/apache/poi/xssf/XSSFMemoryLeakTests.java
deleted file mode 100644 (file)
index 6373763..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-
-package org.apache.poi.xssf;
-
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertSame;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.poi.ooxml.POIXMLException;
-import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
-import org.apache.poi.openxml4j.opc.OPCPackage;
-import org.apache.poi.util.MemoryLeakVerifier;
-import org.apache.poi.xssf.usermodel.XSSFCell;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.Test;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCell;
-
-/**
- * A test which uses {@link MemoryLeakVerifier} to ensure that certain
- * objects are not left over in memory after the test.
- *
- * E.g. verifies that objects are freed when stuff is removed from sheets or rows
- */
-public class XSSFMemoryLeakTests {
-    private final MemoryLeakVerifier verifier = new MemoryLeakVerifier();
-
-    // keep some items in memory, so checks in tearDown() actually
-    // verify that they do not keep certain objects in memory,
-    // e.g. nested CT... objects which should be released
-    @SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
-    private final List<Object> references = new ArrayList<>();
-
-    @AfterEach
-    void tearDown() {
-        verifier.assertGarbageCollected();
-    }
-
-    @Test
-    void testWriteRow() throws IOException {
-        try (XSSFWorkbook wb = new XSSFWorkbook()) {
-            final XSSFSheet sheet1 = wb.createSheet("Sheet1");
-            final XSSFRow row = sheet1.createRow(0);
-            final XSSFCell cell = row.createCell(0);
-            cell.setCellValue("hello");
-
-            // Cannot check the CTCell here as it is reused now and thus
-            // not freed until we free up the Cell itself
-            //verifier.addObject(ctCell);
-
-            try (OutputStream out = new ByteArrayOutputStream(8192)) {
-                wb.write(out);
-            }
-
-            CTCell ctCell = cell.getCTCell();
-            assertSame(cell.getCTCell(), ctCell, "The CTCell should not be replaced");
-            assertSame(row.getCTRow().getCArray(0), ctCell, "The CTCell in the row should not be replaced");
-        }
-    }
-
-    @Test
-    void testRemoveCellFromRow() throws IOException {
-        try (XSSFWorkbook wb = new XSSFWorkbook()) {
-            final XSSFSheet sheet1 = wb.createSheet("Sheet1");
-            final XSSFRow rowToCheck = sheet1.createRow(0);
-            references.add(rowToCheck);
-
-            XSSFCell cell = rowToCheck.createCell(0);
-            cell.setCellValue("hello");
-
-            // previously the CTCell was still referenced in the CTRow, verify that it is freed
-            verifier.addObject(cell);
-            verifier.addObject(cell.getCTCell());
-
-            rowToCheck.removeCell(cell);
-
-            assertNull(rowToCheck.getCell(0));
-        }
-    }
-
-    @Test
-    void testRemove2CellsFromRow() throws IOException {
-        try (XSSFWorkbook wb = new XSSFWorkbook()) {
-            final XSSFSheet sheet1 = wb.createSheet("Sheet1");
-            final XSSFRow rowToCheck = sheet1.createRow(0);
-            references.add(rowToCheck);
-
-            XSSFCell cell1 = rowToCheck.createCell(0);
-            cell1.setCellValue("hello");
-            XSSFCell cell2 = rowToCheck.createCell(1);
-            cell2.setCellValue("world");
-
-            // previously the CTCell was still referenced in the CTRow, verify that it is freed
-            verifier.addObject(cell1);
-            verifier.addObject(cell1.getCTCell());
-            verifier.addObject(cell2);
-            verifier.addObject(cell2.getCTCell());
-
-            rowToCheck.removeCell(cell2);
-            rowToCheck.removeCell(cell1);
-
-            assertNull(rowToCheck.getCell(0));
-            assertNull(rowToCheck.getCell(1));
-        }
-    }
-
-    @Test
-    void testRemoveRowFromSheet() throws IOException {
-        try (XSSFWorkbook wb1 = new XSSFWorkbook()) {
-            final XSSFSheet sheetToCheck = wb1.createSheet("Sheet1");
-            references.add(sheetToCheck);
-            final XSSFRow row = sheetToCheck.createRow(0);
-            final XSSFCell cell = row.createCell(0);
-            cell.setCellValue(1);
-
-            // ensure that the row-data is not kept somewhere in another member
-            verifier.addObject(row.getCTRow());
-            verifier.addObject(row);
-            verifier.addObject(cell.getCTCell());
-            verifier.addObject(cell);
-
-            sheetToCheck.removeRow(row);
-
-            assertNull(sheetToCheck.getRow(0));
-        }
-    }
-
-    @Test
-    void testFileLeak() {
-        File file = XSSFTestDataSamples.getSampleFile("xlsx-corrupted.xlsx");
-        verifier.addObject(file);
-        assertThrows(POIXMLException.class, () -> new XSSFWorkbook(file), "Should catch exception as the file is corrupted");
-    }
-
-    @Test
-    void testFileLeak2() throws IOException, InvalidFormatException {
-        File file = XSSFTestDataSamples.getSampleFile("xlsx-corrupted.xlsx");
-        verifier.addObject(file);
-        try (OPCPackage pkg = OPCPackage.open(file)) {
-            assertThrows(POIXMLException.class, () -> new XSSFWorkbook(pkg), "Should catch exception as the file is corrupted");
-        }
-    }
-}
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFAbstractNum.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFAbstractNum.java
new file mode 100644 (file)
index 0000000..e71c3a2
--- /dev/null
@@ -0,0 +1,31 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+package org.apache.poi.xwpf.usermodel;
+
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+import org.junit.jupiter.api.Test;
+
+public class TestXWPFAbstractNum {
+
+    @Test
+    void getXmlObject() {
+        // minimal test to include generated classes in poi-ooxml-lite
+        XWPFAbstractNum num = new XWPFAbstractNum();
+        assertNull(num.getCTAbstractNum());
+    }
+}
\ No newline at end of file
diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/XWPFAbstractNumTest.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/XWPFAbstractNumTest.java
deleted file mode 100644 (file)
index 7197453..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-package org.apache.poi.xwpf.usermodel;
-
-import static org.junit.jupiter.api.Assertions.assertNull;
-
-import org.junit.jupiter.api.Test;
-
-public class XWPFAbstractNumTest {
-
-    @Test
-    void getXmlObject() {
-        // minimal test to include generated classes in poi-ooxml-lite
-        XWPFAbstractNum num = new XWPFAbstractNum();
-        assertNull(num.getCTAbstractNum());
-    }
-}
\ No newline at end of file
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/BasePPTIteratingTest.java
deleted file mode 100644 (file)
index 24ea8ac..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-package org.apache.poi.hslf.dev;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Stream;
-
-import org.apache.poi.POIDataSamples;
-import org.apache.poi.hslf.exceptions.EncryptedPowerPointFileException;
-import org.apache.poi.hslf.exceptions.OldPowerPointFormatException;
-import org.apache.poi.util.IOUtils;
-import org.apache.poi.util.NullPrintStream;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.MethodSource;
-
-public abstract class BasePPTIteratingTest {
-    protected static final Set<String> OLD_FILES = new HashSet<>();
-    static {
-        OLD_FILES.add("PPT95.ppt");
-        OLD_FILES.add("pp40only.ppt");
-    }
-
-    protected static final Set<String> ENCRYPTED_FILES = new HashSet<>();
-    static {
-        ENCRYPTED_FILES.add("cryptoapi-proc2356.ppt");
-        ENCRYPTED_FILES.add("Password_Protected-np-hello.ppt");
-        ENCRYPTED_FILES.add("Password_Protected-56-hello.ppt");
-        ENCRYPTED_FILES.add("Password_Protected-hello.ppt");
-    }
-
-    protected static final Map<String,Class<? extends Throwable>> EXCLUDED =
-            new HashMap<>();
-
-    public static Stream<Arguments> files() {
-        String dataDirName = System.getProperty(POIDataSamples.TEST_PROPERTY);
-        if(dataDirName == null) {
-            dataDirName = "test-data";
-        }
-
-        List<Arguments> files = new ArrayList<>();
-        findFile(files, dataDirName + "/slideshow");
-
-        return files.stream();
-    }
-
-    private final PrintStream save = System.out;
-
-    @BeforeEach
-    void setUpBase() throws UnsupportedEncodingException {
-        // set a higher max allocation limit as some test-files require more
-        IOUtils.setByteArrayMaxOverride(5*1024*1024);
-
-        // redirect standard out during the test to avoid spamming the console with output
-        System.setOut(new NullPrintStream());
-    }
-
-    @AfterEach
-    void tearDownBase() {
-        System.setOut(save);
-
-        // reset
-        IOUtils.setByteArrayMaxOverride(-1);
-    }
-
-    private static void findFile(List<Arguments> list, String dir) {
-        String[] files = new File(dir).list((arg0, arg1) -> arg1.toLowerCase(Locale.ROOT).endsWith(".ppt"));
-
-        assertNotNull(files, "Did not find any ppt files in directory " + dir);
-
-        for(String file : files) {
-            list.add(Arguments.of(new File(dir, file)));
-        }
-    }
-
-    @ParameterizedTest
-    @MethodSource("files")
-    void testAllFiles(File file) throws Exception {
-        String fileName = file.getName();
-        Class<? extends Throwable> t = null;
-        if (EXCLUDED.containsKey(fileName)) {
-            t = EXCLUDED.get(fileName);
-        } else if (getFailedOldFiles().contains(fileName)) {
-            t = OldPowerPointFormatException.class;
-        } else if (getFailedEncryptedFiles().contains(fileName)) {
-            t = EncryptedPowerPointFileException.class;
-        }
-
-        if (t == null) {
-            runOneFile(file);
-        } else {
-            assertThrows(t, () -> runOneFile(file));
-        }
-    }
-
-    abstract void runOneFile(File pFile) throws Exception;
-
-    protected Set<String> getFailedEncryptedFiles() {
-        return ENCRYPTED_FILES;
-    }
-
-    protected Set<String> getFailedOldFiles() {
-        return OLD_FILES;
-    }
-}
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/dev/BaseTestPPTIterating.java b/src/scratchpad/testcases/org/apache/poi/hslf/dev/BaseTestPPTIterating.java
new file mode 100644 (file)
index 0000000..869b96e
--- /dev/null
@@ -0,0 +1,133 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+package org.apache.poi.hslf.dev;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Stream;
+
+import org.apache.poi.POIDataSamples;
+import org.apache.poi.hslf.exceptions.EncryptedPowerPointFileException;
+import org.apache.poi.hslf.exceptions.OldPowerPointFormatException;
+import org.apache.poi.util.IOUtils;
+import org.apache.poi.util.NullPrintStream;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+public abstract class BaseTestPPTIterating {
+    protected static final Set<String> OLD_FILES = new HashSet<>();
+    static {
+        OLD_FILES.add("PPT95.ppt");
+        OLD_FILES.add("pp40only.ppt");
+    }
+
+    protected static final Set<String> ENCRYPTED_FILES = new HashSet<>();
+    static {
+        ENCRYPTED_FILES.add("cryptoapi-proc2356.ppt");
+        ENCRYPTED_FILES.add("Password_Protected-np-hello.ppt");
+        ENCRYPTED_FILES.add("Password_Protected-56-hello.ppt");
+        ENCRYPTED_FILES.add("Password_Protected-hello.ppt");
+    }
+
+    protected static final Map<String,Class<? extends Throwable>> EXCLUDED =
+            new HashMap<>();
+
+    public static Stream<Arguments> files() {
+        String dataDirName = System.getProperty(POIDataSamples.TEST_PROPERTY);
+        if(dataDirName == null) {
+            dataDirName = "test-data";
+        }
+
+        List<Arguments> files = new ArrayList<>();
+        findFile(files, dataDirName + "/slideshow");
+
+        return files.stream();
+    }
+
+    private final PrintStream save = System.out;
+
+    @BeforeEach
+    void setUpBase() throws UnsupportedEncodingException {
+        // set a higher max allocation limit as some test-files require more
+        IOUtils.setByteArrayMaxOverride(5*1024*1024);
+
+        // redirect standard out during the test to avoid spamming the console with output
+        System.setOut(new NullPrintStream());
+    }
+
+    @AfterEach
+    void tearDownBase() {
+        System.setOut(save);
+
+        // reset
+        IOUtils.setByteArrayMaxOverride(-1);
+    }
+
+    private static void findFile(List<Arguments> list, String dir) {
+        String[] files = new File(dir).list((arg0, arg1) -> arg1.toLowerCase(Locale.ROOT).endsWith(".ppt"));
+
+        assertNotNull(files, "Did not find any ppt files in directory " + dir);
+
+        for(String file : files) {
+            list.add(Arguments.of(new File(dir, file)));
+        }
+    }
+
+    @ParameterizedTest
+    @MethodSource("files")
+    void testAllFiles(File file) throws Exception {
+        String fileName = file.getName();
+        Class<? extends Throwable> t = null;
+        if (EXCLUDED.containsKey(fileName)) {
+            t = EXCLUDED.get(fileName);
+        } else if (getFailedOldFiles().contains(fileName)) {
+            t = OldPowerPointFormatException.class;
+        } else if (getFailedEncryptedFiles().contains(fileName)) {
+            t = EncryptedPowerPointFileException.class;
+        }
+
+        if (t == null) {
+            runOneFile(file);
+        } else {
+            assertThrows(t, () -> runOneFile(file));
+        }
+    }
+
+    abstract void runOneFile(File pFile) throws Exception;
+
+    protected Set<String> getFailedEncryptedFiles() {
+        return ENCRYPTED_FILES;
+    }
+
+    protected Set<String> getFailedOldFiles() {
+        return OLD_FILES;
+    }
+}
index 5b135a5e88f2e422372a3c1208ac42dcbffeb340..206db2b20a1a24e6e2e420e61195090077b1f24d 100644 (file)
 ==================================================================== */
 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]);
index c70b25ec66a86592dfad48354b6dc92ce006472a..c0572750b69879272970eaf57a4147e0f2e55c51 100644 (file)
@@ -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]);
index 3dc19422f2553bef48f088df9eecb1fabf1ac5f3..8ee2010fa7bd7ff036040d12d062ba30f2ebb08e 100644 (file)
@@ -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
index ced2727094a2f98c6ecf7e027321745ad4fc34ff..c61dd00b24b91b6fba5e09d49f3716300c1ccab8 100644 (file)
 ==================================================================== */
 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]);
index cec26a035a935a37fe23a742fcda1e476007de86..ea37f7d15931e38da4fff209178037f30a4020d0 100644 (file)
 ==================================================================== */
 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]);
index 528b6948865e898f77ddaf1f18ec5b68db3d9743..b75bec517888e03cd07a039fa2092dda57d4e194 100644 (file)
 ==================================================================== */
 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]);
index d39cbdcfc19f661c03a10c9862393b11b872ec8b..51b9ee5d694b5cf17ce47e6ebd3b294b65a187ed 100644 (file)
@@ -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");
index 8d2438930203bdc65c091d7dd38364ce7e9d44a0..4392ec603a3cb51833576ef27920b48742b03bd3 100644 (file)
@@ -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[] {
index d5c4892e18fc8deb09d3545b5cd025fa1ec67ba1..5a5d826ef117498954cd4bf6ad8413510f7f6ffb 100644 (file)
 ==================================================================== */
 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");
index cfa2575e50ba62b3804f9300f0adf07168f76d55..c284ce1ba3e3a57800745d0f7306792934b987a1 100644 (file)
 ==================================================================== */
 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/AbstractWordUtilsTest.java
deleted file mode 100644 (file)
index 840e902..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-package org.apache.poi.hwpf.converter;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import org.apache.poi.hwpf.HWPFDocument;
-import org.apache.poi.hwpf.HWPFTestDataSamples;
-import org.apache.poi.hwpf.usermodel.Range;
-import org.apache.poi.hwpf.usermodel.Table;
-import org.junit.jupiter.api.Test;
-
-/**
- * Test cases for {@link AbstractWordUtils}
- */
-public class AbstractWordUtilsTest {
-    /**
-     * Test case for {@link AbstractWordUtils#buildTableCellEdgesArray(Table)}
-     */
-    @Test
-    void testBuildTableCellEdgesArray() {
-        HWPFDocument document = HWPFTestDataSamples
-                .openSampleFile( "table-merges.doc" );
-        final Range range = document.getRange();
-        Table table = range.getTable( range.getParagraph( 0 ) );
-
-        int[] result = AbstractWordUtils.buildTableCellEdgesArray( table );
-        assertEquals( 6, result.length );
-
-        assertEquals( 0000, result[0] );
-        assertEquals( 1062, result[1] );
-        assertEquals( 5738, result[2] );
-        assertEquals( 6872, result[3] );
-        assertEquals( 8148, result[4] );
-        assertEquals( 9302, result[5] );
-    }
-}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestAbstractWordUtils.java b/src/scratchpad/testcases/org/apache/poi/hwpf/converter/TestAbstractWordUtils.java
new file mode 100644 (file)
index 0000000..f666517
--- /dev/null
@@ -0,0 +1,51 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+package org.apache.poi.hwpf.converter;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.apache.poi.hwpf.HWPFDocument;
+import org.apache.poi.hwpf.HWPFTestDataSamples;
+import org.apache.poi.hwpf.usermodel.Range;
+import org.apache.poi.hwpf.usermodel.Table;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test cases for {@link AbstractWordUtils}
+ */
+public class TestAbstractWordUtils {
+    /**
+     * Test case for {@link AbstractWordUtils#buildTableCellEdgesArray(Table)}
+     */
+    @Test
+    void testBuildTableCellEdgesArray() {
+        HWPFDocument document = HWPFTestDataSamples
+                .openSampleFile( "table-merges.doc" );
+        final Range range = document.getRange();
+        Table table = range.getTable( range.getParagraph( 0 ) );
+
+        int[] result = AbstractWordUtils.buildTableCellEdgesArray( table );
+        assertEquals( 6, result.length );
+
+        assertEquals( 0000, result[0] );
+        assertEquals( 1062, result[1] );
+        assertEquals( 5738, result[2] );
+        assertEquals( 6872, result[3] );
+        assertEquals( 8148, result[4] );
+        assertEquals( 9302, result[5] );
+    }
+}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/PlfLfoTest.java
deleted file mode 100644 (file)
index c1ae598..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  ====================================================================
- *    Licensed to the Apache Software Foundation (ASF) under one or more
- *    contributor license agreements.  See the NOTICE file distributed with
- *    this work for additional information regarding copyright ownership.
- *    The ASF licenses this file to You under the Apache License, Version 2.0
- *    (the "License"); you may not use this file except in compliance with
- *    the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- * ====================================================================
- */
-package org.apache.poi.hwpf.model;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-import org.junit.jupiter.api.Test;
-
-public class PlfLfoTest {
-    @Test
-    void testAdd() {
-        PlfLfo p = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0);
-        assertEquals(0, p.getLfoMac());
-        p.add(new LFO(new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0), new LFOData());
-        assertEquals(1, p.getLfoMac());
-        assertNotNull(p.getLfo(1));
-        assertNotNull(p.getLfoData(1));
-    }
-
-    @Test
-    void testEquals() {
-        PlfLfo p = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0);
-        PlfLfo p2 = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0);
-        assertEquals(0, p.getLfoMac());
-        assertEquals(0, p2.getLfoMac());
-
-        assertEquals(p, p2);
-        //noinspection ObjectEqualsNull
-        assertNotEquals(null, p);
-
-        p.add(new LFO(new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0), new LFOData());
-        assertEquals(1, p.getLfoMac());
-
-        assertNotEquals(p, p2);
-
-        p2.add(new LFO(new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0), new LFOData());
-        assertEquals(1, p2.getLfoMac());
-        assertEquals(p, p2);
-    }
-}
\ No newline at end of file
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlfLfo.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlfLfo.java
new file mode 100644 (file)
index 0000000..a18902a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ *  ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one or more
+ *    contributor license agreements.  See the NOTICE file distributed with
+ *    this work for additional information regarding copyright ownership.
+ *    The ASF licenses this file to You under the Apache License, Version 2.0
+ *    (the "License"); you may not use this file except in compliance with
+ *    the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ * ====================================================================
+ */
+package org.apache.poi.hwpf.model;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import org.junit.jupiter.api.Test;
+
+public class TestPlfLfo {
+    @Test
+    void testAdd() {
+        PlfLfo p = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0);
+        assertEquals(0, p.getLfoMac());
+        p.add(new LFO(new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0), new LFOData());
+        assertEquals(1, p.getLfoMac());
+        assertNotNull(p.getLfo(1));
+        assertNotNull(p.getLfoData(1));
+    }
+
+    @Test
+    void testEquals() {
+        PlfLfo p = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0);
+        PlfLfo p2 = new PlfLfo(new byte[] {0, 0, 0, 0}, 0, 0);
+        assertEquals(0, p.getLfoMac());
+        assertEquals(0, p2.getLfoMac());
+
+        assertEquals(p, p2);
+        //noinspection ObjectEqualsNull
+        assertNotEquals(null, p);
+
+        p.add(new LFO(new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0), new LFOData());
+        assertEquals(1, p.getLfoMac());
+
+        assertNotEquals(p, p2);
+
+        p2.add(new LFO(new byte[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, 0), new LFOData());
+        assertEquals(1, p2.getLfoMac());
+        assertEquals(p, p2);
+    }
+}
\ No newline at end of file
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/LFOLVLBaseAbstractTypeTest.java
deleted file mode 100644 (file)
index 3cae7ce..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-package org.apache.poi.hwpf.model.types;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import org.junit.jupiter.api.Test;
-
-/**
- * Test cases for {@link LFOLVLBaseAbstractType}
- */
-public class LFOLVLBaseAbstractTypeTest {
-    @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/LVLFAbstractTypeTest.java
deleted file mode 100644 (file)
index 2f3d1d9..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* ====================================================================
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-==================================================================== */
-package org.apache.poi.hwpf.model.types;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import org.junit.jupiter.api.Test;
-
-/**
- * Test cases for {@link LVLFAbstractType}
- */
-public class LVLFAbstractTypeTest {
-    @Test
-    void testGetSize() {
-        assertEquals( 28, LVLFAbstractType.getSize() );
-    }
-
-}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLFOLVLBaseAbstractType.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLFOLVLBaseAbstractType.java
new file mode 100644 (file)
index 0000000..aa986a5
--- /dev/null
@@ -0,0 +1,32 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+package org.apache.poi.hwpf.model.types;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test cases for {@link LFOLVLBaseAbstractType}
+ */
+class TestLFOLVLBaseAbstractType {
+    @Test
+    void testGetSize() {
+        assertEquals( 8, LFOLVLBaseAbstractType.getSize() );
+    }
+
+}
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLVLFAbstractType.java b/src/scratchpad/testcases/org/apache/poi/hwpf/model/types/TestLVLFAbstractType.java
new file mode 100644 (file)
index 0000000..d48fa9e
--- /dev/null
@@ -0,0 +1,32 @@
+/* ====================================================================
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+==================================================================== */
+package org.apache.poi.hwpf.model.types;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * Test cases for {@link LVLFAbstractType}
+ */
+class TestLVLFAbstractType {
+    @Test
+    void testGetSize() {
+        assertEquals( 28, LVLFAbstractType.getSize() );
+    }
+
+}
index 69311605d9d2586939ee7c7d10d4e5d9001547df..c2c44529b8ba17538d6f4e689a1174416a8337d2 100644 (file)
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
  * This is part 1 of 2 of the tests - it only does the POIDocuments
  *  which are part of the Main (not scratchpad)
  */
-public final class TestPOIDocumentMain {
+final class TestPOIDocumentMain {
     // The POI Documents to work on
     private POIDocument doc;
     private POIDocument doc2;
index ffb65c3919ae41bfdc7cdf334547f3f2f6e567d6..862d0d7e466f15d1dbacc010977b1cc6c84de55f 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 /**
  * A class for testing the POI Junit TestCase utility class
  */
-public final class TestPOITestCase {
+final class TestPOITestCase {
     @Test
     void assertStartsWith() {
         POITestCase.assertStartsWith("Apache POI", "");
index 1ddb8afa3ed6bbb729307ef89dfe1bbc123fc511..43edb89d0cf24b776d4fa4e86c3b245e4b7d2fbb 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherBSERecord {
+final class TestEscherBSERecord {
     @Test
     void testFillFields() {
         String data = "01 00 00 00 24 00 00 00 05 05 01 02 03 04 " +
index 7ce2f22a2e7124fb32c2c85b92c32427ac490f8b..a081f61c65d75c4f44e9cf2cce0094f4d8df4213 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test read/serialize of escher blip records
 */
-public final class TestEscherBlipRecord {
+final class TestEscherBlipRecord {
     private static final POIDataSamples _samples = POIDataSamples.getDDFInstance();
 
     //test reading/serializing of a PNG blip
index 3d62c6a457d1e66fc8d28adaca052e2136a939f5..4957c063d532bf1908d8decfaa841bfebb29d79a 100644 (file)
@@ -21,7 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherBoolProperty {
+final class TestEscherBoolProperty {
     @Test
     void testToString() {
         EscherBoolProperty p = new EscherBoolProperty(EscherPropertyTypes.GEOMETRY__FILLOK, 1);
index cd70f8223f1c1750305475da729b5cc50464c00b..9f24b6d18da4f1d0834903079fbacd40df8d6f46 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherChildAnchorRecord {
+final class TestEscherChildAnchorRecord {
     @Test
     void testSerialize() {
         EscherChildAnchorRecord r = createRecord();
index fb8559e89dfde214a02af4549444cea9c2873647..df139751972264e477b2050da25bb53715269444 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link EscherContainerRecord}
  */
-public final class TestEscherContainerRecord {
+final class TestEscherContainerRecord {
     private static final POIDataSamples _samples = POIDataSamples.getDDFInstance();
 
     @Test
index 5407c23339f24c9f868598745c1a876648d5aa09..ad84a54585c44590cd0c9e9d2494d2d9e5a6ec08 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherDgRecord {
+final class TestEscherDgRecord {
     @Test
     void testSerialize() {
         EscherDgRecord r = createRecord();
index 75d3cdcbc3c6b0a8041500d8ccbbe6c98b47e055..f8f8b58115a5f895ec91809efd4b706a8b578923 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherDggRecord {
+final class TestEscherDggRecord {
     @Test
     void testSerialize() {
         EscherDggRecord r = createRecord();
index bac1991a6ba7d89320babca5d57413ef9a2da1bc..c09dc223c20c8eb68d2e82bdf07d384d169b1da8 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherOptRecord {
+final class TestEscherOptRecord {
 
     @Test
     void testFillFields() {
index 6e3ae093ef8c0b3ee1ead0b752d1970eced4a76c..8aa7aa86d962a8de30aa487e2395379327fdb750 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherSpgrRecord {
+final class TestEscherSpgrRecord {
     @Test
     void testSerialize() {
         EscherSpgrRecord r = createRecord();
index 59584ec0e75b8e3fa664b2f8b8f5156db395b607..1aa96edc5c297d18f5fea3fe934f11b026eab2c2 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestEscherSplitMenuColorsRecord {
+final class TestEscherSplitMenuColorsRecord {
     @Test
     void testSerialize() {
         EscherSplitMenuColorsRecord r = createRecord();
index d6afeaa8ffecce73c4fbb7c459ddadd2c6d40c66..d84f8bcceeb380d5282779f6a4e0371d0c825430 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestUnknownEscherRecord {
+final class TestUnknownEscherRecord {
     @Test
     void testFillFields() {
         String testData =
index 34a6169aa1f3ba41c05f4d631e336bd9e2e56afe..6d95b384505af2722ded418fd9ea0655f48d0ab4 100644 (file)
@@ -48,7 +48,7 @@ import org.junit.jupiter.api.Test;
 /**
  * <p>Tests the basic HPSF functionality.</p>
  */
-public final class TestBasic {
+final class TestBasic {
 
     private static final POIDataSamples samples = POIDataSamples.getHPSFInstance();
 
index fc93ddcec961d0b1263e985da6aa3e18834430e7..ac50ec591ddcc25fd49b02ed81f853216b83abad 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests ClassID structure.
  */
-public final class TestClassID {
+final class TestClassID {
 
     private static final byte[] BUF16 = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
 
index aec88600682377e9f17faeca5f606300369b415a..9ef12894613507821e3b7430b16486ecb9d7f905 100644 (file)
@@ -45,7 +45,7 @@ import org.junit.jupiter.api.Test;
  * Test case for OLE2 files with empty properties.
  * An empty property's type is {@link Variant#VT_EMPTY}.
  */
-public final class TestEmptyProperties {
+final class TestEmptyProperties {
 
     private static final POIDataSamples samples = POIDataSamples.getHPSFInstance();
 
index db5a866523c10790f6efcb92f69a5460b04eccfb..6205713fa349504074397acf942a93f92512a414 100644 (file)
@@ -43,7 +43,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests various bugs have been fixed
  */
-public final class TestHPSFBugs {
+final class TestHPSFBugs {
    private static final POIDataSamples _samples = POIDataSamples.getHPSFInstance();
 
    /**
index 989a83d3844fce5e09ab0954c405b55fd5e47390..f8fb0aad136df828707b22cd4c92c03bf271899a 100644 (file)
@@ -46,7 +46,7 @@ import org.junit.jupiter.api.Test;
  * This class tests reading and writing of meta data. No actual document is created. All information
  * is stored in a virtual document in a ByteArrayOutputStream
  */
-public final class TestMetaDataIPI {
+final class TestMetaDataIPI {
 
        private POIFSFileSystem poifs ;
        private DocumentSummaryInformation dsi;
index 3f05f1729dca92767a4259d76956db912074eb50..85d7d02b89db79fc9fee0866209df7d006a58614 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.junit.jupiter.api.Test;
 
-public final class TestHPSFPropertiesExtractor {
+final class TestHPSFPropertiesExtractor {
     private static final POIDataSamples _samples = POIDataSamples.getHPSFInstance();
 
     @Test
index c3f43af19efcaa2ba00d32c6682e1d8af8aa026c..058e1eda09bbf529e008f2462e257ba105050ead 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link AbortableHSSFListener}
  */
-public final class TestAbortableListener {
+final class TestAbortableListener {
 
        private POIFSFileSystem openSample() throws IOException {
                ByteArrayInputStream is = new ByteArrayInputStream(HSSFITestDataProvider.instance
index 49ef3a0e4437248ff867abe32a0da79315c4d2f6..8bb1b6771ce81fa66e7a6babc16cbf3f3fe46059 100644 (file)
@@ -39,14 +39,13 @@ import org.apache.poi.hssf.record.RecordFactory;
 import org.apache.poi.hssf.record.StandardRecord;
 import org.apache.poi.hssf.record.TestcaseRecordInputStream;
 import org.apache.poi.hssf.record.UnknownRecord;
-import org.apache.poi.util.NotImplemented;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 /**
  * enclosing_type describe the purpose here
  */
-public final class TestEventRecordFactory {
+final class TestEventRecordFactory {
     private static final byte[][] CONTINUE_DATA = {
         // an unknown record with 0 length
         {0, -1, 0, 0,},
index 75e9289121d2fa7f78d1b62847b4999b667f2fc2..fcd9d81dbca6226237e321d07744b65d738e659c 100644 (file)
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link EventWorkbookBuilder}
  */
-public final class TestEventWorkbookBuilder {
+final class TestEventWorkbookBuilder {
     private final List<FormulaRecord> fRecs = new ArrayList<>();
     private SheetRecordCollectingListener listener;
 
index 4b2672cfff6d6fd91c1e730753bbf15ac0fbadcb..74ac31845dbb09598f2d78098eea8bd55de77e05 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for FormatTrackingHSSFListener
  */
-public final class TestFormatTrackingHSSFListener {
+final class TestFormatTrackingHSSFListener {
        private FormatTrackingHSSFListener listener;
        private MockHSSFListener mockListen;
 
index 37bc38eb3740234b95ead3cac893d6dd7aaa9617..24fba3e49256dc10051072b8ac31f0b00c9b8293 100644 (file)
@@ -46,7 +46,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Testing for {@link HSSFEventFactory}
  */
-public final class TestHSSFEventFactory {
+final class TestHSSFEventFactory {
     private final List<org.apache.poi.hssf.record.Record> records = new ArrayList<>();
 
     private void openSample(String sampleFileName) throws IOException {
index 98e7c1c4d9b20f9416251cff65d4ae3ce40f4e1f..852f07e9deb45c6bb793863d8cb4f26b673b0502 100644 (file)
@@ -45,7 +45,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for MissingRecordAwareHSSFListener
  */
-public final class TestMissingRecordAwareHSSFListener {
+final class TestMissingRecordAwareHSSFListener {
 
        private final List<org.apache.poi.hssf.record.Record> _records = new ArrayList<>();
 
index 20ca15d5817a0412ff01081d9663aae4fe30c2ba..7a5ceef5f1df465ae4f63751acc3f979327e9890 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
 /**
  *
  */
-public final class TestExcelExtractor {
+final class TestExcelExtractor {
     private static ExcelExtractor createExtractor(String sampleFileName) throws IOException {
                File file = HSSFTestDataSamples.getSampleFile(sampleFileName);
         POIFSFileSystem fs = new POIFSFileSystem(file);
index c2085841d7dd19983e10b05b234d71fe655a1bdf..3fb037c93e724587e8854de09707096881fce489 100644 (file)
@@ -46,7 +46,7 @@ import org.junit.jupiter.api.Test;
  * Unit tests for the Excel 5/95 and Excel 4 (and older) text
  *  extractor
  */
-public final class TestOldExcelExtractor {
+final class TestOldExcelExtractor {
     private static OldExcelExtractor createExtractor(String sampleFileName) throws IOException {
         File file = HSSFTestDataSamples.getSampleFile(sampleFileName);
         return new OldExcelExtractor(file);
index a9bd7a9015fe173b115590468a82e07d1c471d8c..7dfcd66940a8ce602ea8a7dfea9d5ead0001427e 100644 (file)
@@ -24,7 +24,7 @@ import org.apache.poi.ddf.EscherDggRecord;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public final class TestDrawingManager2 {
+final class TestDrawingManager2 {
     private DrawingManager2 drawingManager2;
     private EscherDggRecord dgg;
 
index 024960310f447573bb2a7342c79e2897e9c677af..0e8964daee05e0ac9432338485dc29a116c47322 100644 (file)
@@ -57,7 +57,7 @@ import org.junit.jupiter.api.Test;
  * Test the low level formula parser functionality. High level tests are to
  * be done via usermodel/HSSFCell.setFormulaValue().
  */
-public final class TestFormulaParser {
+final class TestFormulaParser {
 
     /**
      * @return parsed token array already confirmed not <code>null</code>
index 6447fa21bfb7135dd5d3067a7881c0f5ecc6f7b3..8b41f968794862e5f3f12c09c2d030d141af8695 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
  *  but using parts which need to use
  *  HSSFFormulaEvaluator.
  */
-public final class TestFormulaParserEval {
+final class TestFormulaParserEval {
 
        @Test
        void testWithNamedRange() {
index 066408104a35e2b8c349011444608d7ba8f284f9..f9c06bbedb5d1d40533dc7fdc753f8f11e9595b8 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests <tt>FormulaParser</tt> specifically with respect to IF() functions
  */
-public final class TestFormulaParserIf {
+final class TestFormulaParserIf {
        private static Ptg[] parseFormula(String formula) {
                return TestFormulaParser.parseFormula(formula);
        }
index d9ce8b98fb47d2ab266a3f792d35c28d798e7eae..32e3736d0c784e755561cbf40868fc9b0e8fda8c 100644 (file)
@@ -49,7 +49,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link LinkTable}
  */
-public final class TestLinkTable {
+final class TestLinkTable {
 
        /**
         * The example file attached to bugzilla 45046 is a clear example of Name records being present
index 6d752d1f4095b907fa93b3d59dd87e6cd74adbff..f36ee053a8084eac39b17ff29d40373b78fc7a9c 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests specific formula examples in <tt>OperandClassTransformer</tt>.
  */
-public final class TestOperandClassTransformer {
+final class TestOperandClassTransformer {
 
     private static Ptg[] parseFormula(String formula) {
         Ptg[] result = HSSFFormulaParser.parse(formula, null);
index c8c4e2ee9b485441f7b5206a41de8842f248b37a..488a9e6fc5e524e0f1986f2bde97314ef1c7d621 100644 (file)
@@ -19,7 +19,6 @@ package org.apache.poi.hssf.model;
 
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -45,7 +44,7 @@ import org.junit.jupiter.params.provider.MethodSource;
  * <tt>OperandClassTransformer</tt> by comparing its results with those
  * directly produced by Excel (in a sample spreadsheet).
  */
-public final class TestRVA {
+final class TestRVA {
 
        private static final String NEW_LINE = System.getProperty("line.separator");
        private static POIFSFileSystem poifs;
index 5affa8bae9d0ba851605be4e07b5c7f2045e2644..fde901216ba81f893a50a120b67ae05de19c4205 100644 (file)
@@ -21,7 +21,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.Arrays;
 
@@ -39,7 +38,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestRowBlocksReader {
+final class TestRowBlocksReader {
     @Test
        void testAbnormalPivotTableRecords_bug46280() {
                int SXVIEW_SID = ViewDefinitionRecord.sid;
index 5818285a67e970b74e22fdfa267db6fc8c5c815d..aef0c5e40b456bb2a968310f57971b73bc002890 100644 (file)
@@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Unit test for the {@link InternalSheet} class.
  */
-public final class TestSheet {
+final class TestSheet {
        private static InternalSheet createSheet(List<org.apache.poi.hssf.record.Record> inRecs) {
                return InternalSheet.createSheet(new RecordStream(inRecs, 0));
        }
index de076476d3797119912fc1a259bdd9c97bd17355..c58dd39849b193775b1ce7df786577a5b608e4f6 100644 (file)
@@ -23,7 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
 import org.apache.poi.hssf.record.ColumnInfoRecord;
 import org.junit.jupiter.api.Test;
 
-public final class TestSheetAdditional {
+final class TestSheetAdditional {
        @Test
        void testGetCellWidth() {
                InternalSheet sheet = InternalSheet.createSheet();
index 687225b9feea70217ae4b77f823a67c44a2b756f..ba63dc70b7ea66db9880abee53331e2a0a417bdc 100644 (file)
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Unit test for the Workbook class.
  */
-public final class TestWorkbook {
+final class TestWorkbook {
     @Test
     void testFontStuff() throws IOException {
         HSSFWorkbook hwb = new HSSFWorkbook();
index 7018ff54ae5545b3ce8aef37d0babdad59a262ec..8433fb4cb1bca43f586a325df20cd1a64ad4d30a 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestArrayRecord {
+final class TestArrayRecord {
 
     @Test
     void testRead() {
index 3288b75131293c2c5b329a775719cedf09550f8c..9c855f8b3efa4cbf5dd1a164b413441ebac234d5 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the AutoFilterInfoRecord class.
  */
-public final class TestAutoFilterInfoRecord {
+final class TestAutoFilterInfoRecord {
     private final byte[] data = new byte[] {
         0x05, 0x00
     };
index 45af19a12e4e2680783d3867c09ebffeb02411b0..bbf5bf3549be45072950ea809e2fa2f72b7b2592 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.junit.jupiter.api.Test;
 
-public final class TestBOFRecord {
+final class TestBOFRecord {
     @Test
     void testBOFRecord() throws IOException {
         // This used to throw an error before - #42794
index 04ab3d3bb2831f29a9d8a99b2fab577e3c02bfac..700f415f077956652c2b0399c7a8e0aa902907b7 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link BoolErrRecord}
  */
-public final class TestBoolErrRecord {
+final class TestBoolErrRecord {
 
        @Test
        void testError() {
index 79ea46e9d78f526ba145a0e6c3c1b131555b0a83..3ee14a90ba052918a9daa28d5d35213175dd4cbf 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests BoundSheetRecord.
  */
-public final class TestBoundSheetRecord {
+final class TestBoundSheetRecord {
 
        @Test
        void testRecordLength() {
index 6551b42d50a402d532c75aff87fbd9da741fa974..0a43dbfdb640ade8cec0f97362f38639f6cc1830 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the {@link CFHeaderRecord}
  *  and {@link CFHeader12Record} classes works correctly.
  */
-public final class TestCFHeaderRecord {
+final class TestCFHeaderRecord {
        @Test
        void testCreateCFHeaderRecord () {
                CFHeaderRecord record = new CFHeaderRecord();
index ac8346d053cea895f005b2e114a5320dcccbdc6d..81689f140c5a3272a7df788c4cb5074f24637406 100644 (file)
@@ -48,7 +48,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the TestCFRuleRecord
  * class works correctly.
  */
-public final class TestCFRuleRecord {
+final class TestCFRuleRecord {
     @Test
     void testConstructors () throws IOException {
         try (HSSFWorkbook workbook = new HSSFWorkbook()) {
index dff4b02a04196b0482ad79474200c4058d5d8fb8..6d472b9c2b2260ab436c77b3681c0554a45ff36d 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link ColumnInfoRecord}
  */
-public final class TestColumnInfoRecord {
+final class TestColumnInfoRecord {
 
        @Test
        void testBasic() {
index 49ae12cb3b460c63a80af9c3e830a005bf660a6a..5fccfd0975c19d072d85d4169e56b63296c85b19 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestCommonObjectDataSubRecord {
+final class TestCommonObjectDataSubRecord {
        byte[] data = new byte[] {
                (byte)0x12,(byte)0x00,(byte)0x01,(byte)0x00,
                (byte)0x01,(byte)0x00,(byte)0x11,(byte)0x60,
index e95f4d31ab54979e05bf3d3d886f4b2a1d02907d..00b25ac2259281f80b7695a6605687b1c96e981c 100644 (file)
@@ -25,7 +25,7 @@ import java.io.ByteArrayInputStream;
 import org.apache.poi.util.LittleEndian;
 import org.junit.jupiter.api.Test;
 
-public final class TestDVALRecord {
+final class TestDVALRecord {
     @Test
     void testRead() {
         byte[] data = new byte[22];
index 0526812a0dc140f2d0b46daf96e1c90fee008392..e7c97e86ec9e88f48482902bd9bcd46d33ff6357 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.poi.ddf.EscherSpRecord;
 import org.apache.poi.util.HexDump;
 import org.junit.jupiter.api.Test;
 
-public final class TestDrawingGroupRecord {
+final class TestDrawingGroupRecord {
     private static final int MAX_RECORD_SIZE = 8228;
     private static final int MAX_DATA_SIZE = MAX_RECORD_SIZE - 4;
 
index 764f25fe298d3c0177155d71aeee4899ee03cc0a..bac766e08afdd80346020e1a5d1a2cd1345aec3b 100644 (file)
@@ -29,7 +29,7 @@ import java.util.List;
 
 import org.junit.jupiter.api.Test;
 
-public final class TestDrawingRecord {
+final class TestDrawingRecord {
 
     /**
      * Check that RecordFactoryInputStream properly handles continued DrawingRecords
index b33166ebbb8b64276173abb7beedebb8a0367370..0f936fd4059fd4fff550e3ffb39b218849639def 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the TestEmbeddedObjectRefSubRecord
  * class works correctly.  Test data taken directly from a real Excel file.
  */
-public final class TestEmbeddedObjectRefSubRecord {
+final class TestEmbeddedObjectRefSubRecord {
 
        private static final short EORSR_SID = EmbeddedObjectRefSubRecord.sid;
 
index 3a138169826c5dce6179be2dbf849636278d5d3c..0a69b6554fb3178a920087c74afc4fe60748576a 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the EndSubRecord
  * class works correctly.  Test data taken directly from a real Excel file.
  */
-public final class TestEndSubRecord {
+final class TestEndSubRecord {
     private static final byte[] data =  { };
 
     @Test
index a8f1c1f170c519d0cb4fef54d124701a5542eb2e..3578a8d99b9b648ed08b00494c9aab9271d2850f 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the EscherAggregate class.
  */
-public final class TestEscherAggregate {
+final class TestEscherAggregate {
     /**
      * Tests that the create aggregate method correctly rejoins escher records together.
      */
index d1fd7dd97e1999cf7348930504485e5780b20b0a..6b0933cc316d3296a15e878970f325c5229c908a 100644 (file)
@@ -26,7 +26,7 @@ import java.io.IOException;
 import org.apache.poi.poifs.storage.RawDataUtil;
 import org.junit.jupiter.api.Test;
 
-public final class TestExtSSTRecord {
+final class TestExtSSTRecord {
 
     /**
      *  ExtSSTRecord can be continued. Ensure we properly read the continue remainder.
index 322ce95bdfd114c9e32fa38ae4b48f0fd1a1d593..f4d191d69f5b6f00151667ac16370513fbc6b2e6 100644 (file)
@@ -22,7 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import org.junit.jupiter.api.Test;
 
-public final class TestExtendedFormatRecord {
+final class TestExtendedFormatRecord {
 
        private static final byte[] data = {
                        0, 0, // Font 0
index 9fb1602b205e92040bd79178a41724f3276eb3ff..41372882c62f963519c0feeca18d82bb6daf7251 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.poi.util.HexDump;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestExternalNameRecord {
+final class TestExternalNameRecord {
 
        private static final byte[] dataFDS = {
                0, 0, 0, 0, 0, 0, 3, 0, 70, 68, 83, 0, 0,
index a7a34a58e22e74e5a6855bdead85250c32160dc3..c6a9cd958162e9ad7fe0871b0a58f1a05e5f4e46 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for <tt>FeatRecord</tt>
  */
-public final class TestFeatRecord {
+final class TestFeatRecord {
        @Test
        void testWithoutFeatRecord() throws Exception {
                HSSFWorkbook hssf =
index a9fb1aea284e0f8ba9a49e7aea607e8e57d292b4..2dbaeb481877f2205d1dfcebdefb639b1622ddee 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the {@link FontRecord}
  * class works correctly.  Test data taken directly from a real Excel file.
  */
-public final class TestFontRecord {
+final class TestFontRecord {
 
     private static final int SID = 0x31;
     private static final byte[] data = {
index af4bb2c927c6e840c6743f79938b54a374513c07..623588ffee74fc2687e4e9877ad3c0ce4f011404 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link FormulaRecord}
  */
-public final class TestFormulaRecord {
+final class TestFormulaRecord {
 
        @Test
        void testCreateFormulaRecord () {
index fa0aa8882feea3f5e7ef1321adfbeabb96fb324b..2804fe3d717ca2b15769ad9cbbdb0c77f0a1cfd6 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the FtCblsSubRecord
  * class works correctly.
  */
-public final class TestFtCblsSubRecord {
+final class TestFtCblsSubRecord {
     private final byte[] data = new byte[] {
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00,
         0x01, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00
index 2ac1126ba8403b9637dc04c48ffeba59d101c4a3..a372d11685d2406e46189c1fb4a4571f5766835e 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test HyperlinkRecord
  */
-public final class TestHyperlinkRecord {
+final class TestHyperlinkRecord {
 
     //link to http://www.lakings.com/
     private static final byte[] data1 = {
index 47e92fbed6289d527d6f1555ccbe35f0212f44d4..169efaf2addc553ccdd8667844aaba99dcc9fcd9 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestInterfaceEndRecord {
+final class TestInterfaceEndRecord {
 
     @Test
     void testCreate() {
index dd005ed4f80e257b0dcbac2a8fc371876c86be25..84946bd6b26d469e836ab26d2f60d605fa90cbd6 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for <tt>LabelRecord</tt>
  */
-public final class TestLabelRecord  {
+final class TestLabelRecord  {
 
        @Test
        void testEmptyString() throws IOException {
index 759181a605e0ad97bbcb1d2b356feb7e9a59a1ec..afd988fb373443d467addaa5fb2fa8dac259c373 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the serialization and deserialization of the LbsDataSubRecord class works correctly.
  */
-public final class TestLbsDataSubRecord {
+final class TestLbsDataSubRecord {
 
     /**
      * test read-write round trip
index 6ab7a1dec5aed83c6545e1e356dcf039f126088c..7e9e1da0d02c6838ebe17e063062775edd55d278 100644 (file)
@@ -19,12 +19,9 @@ package org.apache.poi.hssf.record;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotSame;
-import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
-import java.util.ArrayList;
 import java.util.Collections;
-import java.util.List;
 
 import org.apache.poi.hssf.model.RecordStream;
 import org.apache.poi.hssf.record.aggregates.MergedCellsTable;
@@ -35,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Make sure the merge cells record behaves
  */
-public final class TestMergeCellsRecord {
+final class TestMergeCellsRecord {
 
        /**
         * Make sure when a clone is called, we actually clone it.
index 555153e40900932bfb6a60124378ab42d9bee215..9884379747ec3b28235c36d5429ff5c515c6d51a 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the NameCommentRecord serializes/deserializes correctly
  */
-public final class TestNameCommentRecord {
+final class TestNameCommentRecord {
        @Test
        void testReserialize() {
                final byte[] data = HexRead
index 34475b59aa8b11017f1c196edecf2033d28248d9..12da16075294a9066b20a4882f0eb91f33647a01 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the NameRecord serializes/deserializes correctly
  */
-public final class TestNameRecord {
+final class TestNameRecord {
 
        /**
         * Makes sure that additional name information is parsed properly such as menu/description
index eec2c299299e122a98d6899e560fc971c6ef0784..b59541da10b2baf744cfac6c4285e5818553299e 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestNoteRecord {
+final class TestNoteRecord {
     private final byte[] testData = HexRead.readFromString(
             "06 00 01 00 02 00 02 04 " +
             "1A 00 00 " +
index 5f55d50c3327dbdcc2c5cd327482c9bf2e5c61f8..9aa690b79f1574210948c1b695d08899ea9c7a5c 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestNoteStructureSubRecord {
+final class TestNoteStructureSubRecord {
     private final byte[] data = new byte[] {
         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x80, 0x00, 0x00, 0x00,
         0x00, 0x00, (byte)0xBF, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x81, 0x01,
index 325bfbac01f835cbc9be3de0653e4b26f99df761..f797358de930d43f0269c56bdfd7b14de333d1a7 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the ObjRecord class works correctly.
  * Test data taken directly from a real Excel file.
  */
-public final class TestObjRecord {
+final class TestObjRecord {
     /**
      * OBJ record data containing two sub-records.
      * The data taken directly from a real Excel file.
index bae54fad144efed7d127ce768d3abc64eaf86615..3f27f64108ce9cd2c8e0c0d6822f7e0bd0eb37e6 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
  * https://issues.apache.org/bugzilla/show_bug.cgi?id=53972
  */
 
-public final class TestPLVRecord {
+final class TestPLVRecord {
     private final static String DV_DEFINITION = "$A$1:$A$5";
     private final static String XLS_FILENAME = "53972.xls";
     private final static String SHEET_NAME = "S2";
index e0816996e7e9c4672a282d2339e4dd3432fb67f4..ac97d99d4e107f4a5f69391de43145ffd76251d9 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Verifies that custom palette editing works correctly
  */
-public final class TestPaletteRecord {
+final class TestPaletteRecord {
 
     /**
      * Tests that the default palette matches the constants of HSSFColor
index 3ffcc521cd010dbf01ae986dccce80d7b1de3e4d..c20209cf5bc085377bcdda6428c9019da1f7ca93 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestPaneRecord {
+final class TestPaneRecord {
     byte[] data = new byte[] {
         (byte)0x01, (byte)0x00,
         (byte)0x02, (byte)0x00,
index 707f2a0538a71badfe68f7317b90608c7e0779cc..670e2fe70c14ab8d7e6aa2ea0fd467aa839e2675 100644 (file)
@@ -24,7 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import org.apache.poi.util.HexRead;
 import org.junit.jupiter.api.Test;
 
-public final class TestRecalcIdRecord {
+final class TestRecalcIdRecord {
 
        private static RecalcIdRecord create(byte[] data) {
                RecordInputStream in = TestcaseRecordInputStream.create(RecalcIdRecord.sid, data);
index 0518d40ca4356ee1eec60a53d0fd62225a9d4497..11f66367e1e16c9cd3168941b8bf7bf852e6d606 100644 (file)
@@ -17,7 +17,9 @@
 
 package org.apache.poi.hssf.record;
 
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -32,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the record factory
  */
-public final class TestRecordFactory {
+final class TestRecordFactory {
 
 
        /**
index 7eadb13863cefbe62e97588d5b12e0c95ef8ce28..9c7d6be428d2e3cc4e99b058d814b1a52ac66aea 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestRecordFactoryInputStream {
+final class TestRecordFactoryInputStream {
        /**
         * Hex dump of a BOF record and most of a FILEPASS record.
         * A 16 byte saltHash should be added to complete the second record
index aebd43e05ff85a9f89425c954a5c0b7364e9fab7..0956350283cd91e4e71d6af7470ae9efd98fa45a 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.params.provider.CsvSource;
 /**
  * Tests for {@link RecordInputStream}
  */
-public final class TestRecordInputStream {
+final class TestRecordInputStream {
 
        /**
         * Data inspired by attachment 22626 of bug 45866<br>
index f9e7ca4e3929a46d548dd0d2b50ed3fb4031858f..92e5abff02133f73fbbf09cbfc47f56d9fa0b724 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestSCLRecord {
+final class TestSCLRecord {
     byte[] data = new byte[] {
       (byte)0x3,(byte)0x0,(byte)0x4,(byte)0x0
     };
index 5b920e5b87c5d24cfc68c0d1f2b2e411ceec8674..7bde03cb06abc2f79899ef61571d43c4840bde40 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Glen Stampoultzis (glens at apache.org)
  */
-public final class TestSSTDeserializer {
+final class TestSSTDeserializer {
        private static final int FAKE_SID = -5555;
 
     private static byte[] concat(byte[] a, byte[] b) {
index d4bbb5e2bd543d5592cc1873b302d91a613478a5..b2206b86b7a1c9fb48686240fce70b7d65bba9ca 100644 (file)
@@ -41,7 +41,7 @@ import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.LocaleUtil;
 import org.junit.jupiter.api.Test;
 
-public final class TestSSTRecord {
+final class TestSSTRecord {
 
     /**
      * decodes hexdump files and concatenates the results
index 2fd22d799e1e54c61f8241775ee85806b62f6ac0..db0593f344c244f7d6012220905faf1e101f82fa 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests that records size calculates correctly.
  */
-public final class TestSSTRecordSizeCalculator {
+final class TestSSTRecordSizeCalculator {
        private static final String SMALL_STRING = "Small string";
        private static final int COMPRESSED_PLAIN_STRING_OVERHEAD = 3;
        private static final int OPTION_FIELD_SIZE = 1;
index 899668642f92ab68a6a0e6d4d6348592e5bc76ff..17855c08de20bfd4329a7793ff4470dcec483d52 100644 (file)
@@ -41,7 +41,7 @@ import org.apache.poi.ss.usermodel.CellValue;
 import org.apache.poi.util.LittleEndianInput;
 import org.junit.jupiter.api.Test;
 
-public final class TestSharedFormulaRecord {
+final class TestSharedFormulaRecord {
 
     /**
      * A sample spreadsheet known to have one sheet with 4 shared formula ranges
index 1261b8a2ad39e536637f98233c4fbdc62804449c..18d345213e5531c6d8321a2e3fa26de4c19d5daa 100644 (file)
@@ -20,7 +20,6 @@ package org.apache.poi.hssf.record;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.IOException;
 
@@ -34,7 +33,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestStringRecord {
+final class TestStringRecord {
        private static final byte[] data = HexRead.readFromString(
                        "0B 00 " + // length
                        "00 " +    // option
index b77916504db14dbbb577fab0b8fd53a8af144968..ed47560caf487352751347ef1257916e4f74eae4 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link StyleRecord}
  */
-public final class TestStyleRecord {
+final class TestStyleRecord {
        @Test
        void testUnicodeReadName() {
                byte[] data = HexRead.readFromString(
index dc8accf55666ca95c7276b800cfa7714293b93ec..b10800d5a392e24432335aae03d384f0abdd6cb1 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  * Tests Subrecord components of an OBJ record.  Test data taken directly
  * from a real Excel file.
  */
-public final class TestSubRecord {
+final class TestSubRecord {
        /*
           The following is a dump of the OBJ record corresponding to an auto-filter
           drop-down list. The 3rd subrecord beginning at offset 0x002e (type=0x0013)
index 8a412703c2261877689fd92a96e7e7e1cef7289d..1766c514dda4c7aa283f7311d85f112217ebe275 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the SupBook record
  * class works correctly.
  */
-public final class TestSupBookRecord {
+final class TestSupBookRecord {
     /**
      * This contains a fake data section of a SubBookRecord
      */
index 22c8ab41fc7920bc212596e82313832463588579..58cd682df20ebad0aa7729d56f03217f0b974757 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestTableRecord {
+final class TestTableRecord {
        byte[] header = new byte[] {
                        0x36, 02, 0x10, 00, // sid=x236, 16 bytes long
        };
index 02acfc7877f99858963f27c7fb45584102e0839e..6af2622dcb15280e0abe4e59e52647374d7afefb 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestTextObjectBaseRecord {
+final class TestTextObjectBaseRecord {
        /** data for one TXO rec and two continue recs */
     private static final byte[] data = HexRead.readFromString(
         "B6 01 " + // TextObjectRecord.sid
index a9d4f3ff822bbda4598beb1bd4f3b8604954d0f2..272b1802e1ffb010e605bafb820016aa2143e609 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Yegor Kozlov
  */
-public final class TestTextObjectRecord {
+final class TestTextObjectRecord {
 
     private static final byte[] simpleData = HexRead.readFromString(
         "B6 01 12 00 " +
index 355321fab61841de3322935f30e03e0f65b1a56c..773b8666c129437256ec4c9b9e24b5dea2f8cf21 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.junit.jupiter.api.Test;
 
-public final class TestUnicodeNameRecord {
+final class TestUnicodeNameRecord {
 
        @Test
        void testReadBook() throws IOException {
index 04d49eca321b041ed43d11b63a33f024aedb3966..364e478932b55343c3c719212fce286cd5b2a550 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link WriteAccessRecord}
  */
-public final class TestWriteAccessRecord {
+final class TestWriteAccessRecord {
 
        private static final String HEX_SIXTYFOUR_SPACES = ""
                + "20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 "
index d471a4983e4de4193cb09f51984fe0ab0f081d47..b400b76c24fe962272b9d1451897c969be04197f 100644 (file)
@@ -48,7 +48,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.
  */
 @SuppressWarnings("resource")
-public final class TestCFRecordsAggregate {
+final class TestCFRecordsAggregate {
     @Test
     void testCFRecordsAggregate() {
         HSSFWorkbook workbook = new HSSFWorkbook();
index bcade8e406b0531b45a05936e34ac37ec04e997a..6fae73f0415fba29ba58205a56d0bd429357bc7a 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.hssf.record.ColumnInfoRecord;
 import org.apache.poi.hssf.record.RecordBase;
 import org.junit.jupiter.api.Test;
 
-public final class TestColumnInfoRecordsAggregate {
+final class TestColumnInfoRecordsAggregate {
 
        @Test
     void testGetRecordSize() {
index d9eb109964e95d6b3310c494383d2cf2802e8f34..8bfc6576c204686ba07f59ec4160c691742534fa 100644 (file)
@@ -34,7 +34,7 @@ import org.apache.poi.ss.formula.ptg.Ptg;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.junit.jupiter.api.Test;
 
-public final class TestFormulaRecordAggregate {
+final class TestFormulaRecordAggregate {
 
        @Test
        void testBasic() {
index aa33e44488305b86d5ce88096658c8deb42ac851..243e1adc2e02a69d2ee56883c0beb6d5da6bd94c 100644 (file)
@@ -60,7 +60,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tess for {@link PageSettingsBlock}
  */
-public final class TestPageSettingsBlock {
+final class TestPageSettingsBlock {
        @Test
        void testPrintSetup_bug46548() {
                // PageSettingBlock in this file contains PLS (sid=x004D) record
index 8926ab08228b3fbb191506e1a12c3f1224eb5c9e..41ad8fbcb54f0608156a9c1bfda0a23059d46fe2 100644 (file)
@@ -47,7 +47,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link RowRecordsAggregate}
  */
-public final class TestRowRecordsAggregate {
+final class TestRowRecordsAggregate {
 
     @Test
        void testRowGet() {
index 4c89b919cd26f456a982e10da582a86f11729a6b..31b4f92548ec08c5f4976a882ec143dd28207411 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link SharedValueManager}
  */
-public final class TestSharedValueManager {
+final class TestSharedValueManager {
 
        /**
         * This Excel workbook contains two sheets that each have a pair of overlapping shared formula
index 82d976529948a9d85203b854ee0a35fee298b6ed..38018f3627dcc9cfd28529a9367e099947f366e4 100644 (file)
@@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -52,7 +51,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link ValueRecordsAggregate}
  */
-public final class TestValueRecordsAggregate {
+final class TestValueRecordsAggregate {
        private static final String ABNORMAL_SHARED_FORMULA_FLAG_TEST_FILE = "AbnormalSharedFormulaFlag.xls";
        private final ValueRecordsAggregate valueRecord = new ValueRecordsAggregate();
 
index 61921d6d2e493ae3c27bc7c89847277e5ed4955e..cb0a6a548b855311d9907a3862b649f824a29484 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests CellRange operations.
  */
-public final class TestCellRange {
+final class TestCellRange {
        private static final CellRangeAddress biggest     = createCR( 0, -1, 0,-1);
        private static final CellRangeAddress tenthColumn = createCR( 0, -1,10,10);
        private static final CellRangeAddress tenthRow    = createCR(10, 10, 0,-1);
index fe81173573d10a001455cc481f561b43a33ff616..c0cb666800a50dfa087522b9e4a5d352c5e828c4 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestAreaFormatRecord {
+final class TestAreaFormatRecord {
     byte[] data = new byte[] {
         (byte)0xFF,(byte)0xFF,(byte)0xFF,(byte)0x00,    // forecolor
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,    // backcolor
index 971030de6c947889a44999be50e0b8e01b0eefbc..638b32635c0fa91fec9a50c588fb35fdade0891f 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestAreaRecord {
+final class TestAreaRecord {
     byte[] data = new byte[] {
         (byte)0x02,(byte)0x00       // format flags
     };
index d59ff0f9c8ec6d59073a26b7eb7802eca15dfc47..7e1a07f65118cef8cc26fbf9daba1b0e19cb7b68 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestAxisLineFormatRecord {
+final class TestAxisLineFormatRecord {
     byte[] data = new byte[] {
         (byte)0x01,(byte)0x00
     };
index f4da9d33d3156c4b1431d8c9d821e599c04501e1..06c03ee0ca1576a9c25178a891c3a3bfd4eec804 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestAxisOptionsRecord {
+final class TestAxisOptionsRecord {
     private static final byte[] data = {
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00,
index 8aecd9fb6a9cd0034d3b006ed836c4bf24fb2531..0c77fbcf2dc35398a3f91cda07dd65ee404448fd 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestAxisParentRecord {
+final class TestAxisParentRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,                                   // axis type
         (byte)0x1D,(byte)0x02,(byte)0x00,(byte)0x00,             // x
index 3471aad2ffa66b78525602ee283439b4e64f9f13..70b504c6ac79c511f98abcc384f17321f8baf5d6 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestAxisRecord {
+final class TestAxisRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,                               // type
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
index 3c4cfeb1f4827828b62d5d5b521eea6553875ab9..4a494d2f8bc6b33fb5eb2ce298b5204de237ed22 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestAxisUsedRecord {
+final class TestAxisUsedRecord {
     byte[] data = new byte[] {
         (byte)0x01,(byte)0x00,
     };
index 6133b146e83617b358ab6001d268176b2a265f27..975f6c998ff0ab0c21332437f567396c9137d380 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestBarRecord {
+final class TestBarRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,   // bar space
         (byte)0x96,(byte)0x00,   // category space
index 6a2ea9c6b46579f607f40a4f8c9c4f2947781364..87f020479bb33b9061af39b3d7de056e873bd9f3 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestCategorySeriesAxisRecord {
+final class TestCategorySeriesAxisRecord {
     byte[] data = new byte[] {
         (byte)0x01,(byte)0x00,    // crossing point
         (byte)0x01,(byte)0x00,    // label frequency
index 51652848c99565336c4fd4e6dd5b85dc771f81ea..1341bce4b84111e1a651d7395dd06215237ab6c7 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  * Tests for {@link ChartFormatRecord} Test data taken directly from a real
  * Excel file.
  */
-public final class TestChartFormatRecord {
+final class TestChartFormatRecord {
        /**
         * This rather uninteresting data came from attachment 23347 of bug 46693 at
         * offsets 0x6BB2 and 0x7BAF
index bfe73a50566edd44d630e6b60e478bbc5621742d..a2eaa8fa43b10464b6a3d58551c1e475e9c68aba 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestChartRecord {
+final class TestChartRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,
index 29c4ed46b85a6fce71ebff1686d4af1076189a2f..e719910ddf0a89663ffb4bc898748af44d44eb8d 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.junit.jupiter.api.Test;
 
-public final class TestChartTitleFormatRecord {
+final class TestChartTitleFormatRecord {
 
        @Test
     void testRecord() throws Exception {
index 13af42e0c8227d7b41fbb39ed6147c4ed201fd3f..8511d1cdf56d92718e4352a3bb6ed703d336b252 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestDatRecord {
+final class TestDatRecord {
     byte[] data = new byte[] {
         (byte)0x0D,(byte)0x00   // options
     };
index 0a0bc16ee0efda8c12a0750a06b5a88f531daaa6..a146408400023107bc0764c6173a30026cfccc32 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestDataFormatRecord {
+final class TestDataFormatRecord {
     byte[] data = new byte[] {
         (byte)0xFF,(byte)0xFF,      // point number
         (byte)0x00,(byte)0x00,      // series index
index 0eccb1ef4c83fd08e817b73574af067f4bcddd9f..6ebf3a6191a55c13e6fbd3cd04cd3e8fe956e850 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestDefaultDataLabelTextPropertiesRecord {
+final class TestDefaultDataLabelTextPropertiesRecord {
     byte[] data = new byte[] {
         (byte)0x02,(byte)0x00
     };
index e0e0916f43ca0a66d7af7fb1d66e5be80bc5fe33..5042e5663d98c8d2b0cf4f75c3381191cd632ad8 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestFontBasisRecord {
+final class TestFontBasisRecord {
     byte[] data = new byte[] {
         (byte)0x28,(byte)0x1A,   // x basis
         (byte)0x9C,(byte)0x0F,   // y basis
index e7ec924ca337b27a8801b9c294e060cce1650564..ca92378c8c98e1046841bf788d9a6b11f04cd032 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestFontIndexRecord {
+final class TestFontIndexRecord {
     byte[] data = new byte[] {
         (byte)0x05,(byte)0x00
     };
index 57c8174e33baa3c8739168c084c16f76fd0f5124..ca8ec3ca9b3a078e205c0dbe52c5a6dd57296da0 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestFrameRecord {
+final class TestFrameRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,      // border type
         (byte)0x02,(byte)0x00       // options
index fba93251aad5b6f2aded279b4ce3111856ff6b02..d5c995fd5b2edc3afc5931f824bc1d2327b7adee 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the LegendRecord class works
  * correctly. Test data taken directly from a real Excel file.
  */
-public final class TestLegendRecord {
+final class TestLegendRecord {
        byte[] data = new byte[] { (byte) 0x76, (byte) 0x0E, (byte) 0x00, (byte) 0x00, (byte) 0x86,
                        (byte) 0x07, (byte) 0x00, (byte) 0x00, (byte) 0x19, (byte) 0x01, (byte) 0x00,
                        (byte) 0x00, (byte) 0x8B, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x03,
index a03b7be146602141a8e8c2cfce8042e4f726c8a5..89fd5e48e4800176cdecc09bf16507c6ed89ef8e 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestLineFormatRecord {
+final class TestLineFormatRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,    // colour
         (byte)0x00,(byte)0x00,                          // pattern
index 977a446c025074e954ac6eda250d4d0f1ddf1b14..b21fd2d71d26f34686f4e08896d4ad2f5dac9136 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestLinkedDataRecord {
+final class TestLinkedDataRecord {
 
 /*
     The records below are records that would appear in a simple bar chart
index 3c0ad353f239a1024bbde990a08b1144a5639076..12c7cc73429e595ea6ee6e02d5b98803fca1e90e 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestNumberFormatIndexRecord {
+final class TestNumberFormatIndexRecord {
     byte[] data = new byte[] {
         0x05,0x00
     };
index 8d10c0c2cf1222ca2fdddc9b051f241db9601064..cd0b87bbc855643f0b6309750444d094b4479c97 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestObjectLinkRecord {
+final class TestObjectLinkRecord {
     byte[] data = new byte[] {
        (byte)0x03,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00
     };
index badc1143130714df472eb40b3f78a68db6e6e5c7..2c9d42a8dc879a6dcd036097e90a750cabf12a7a 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestPlotAreaRecord {
+final class TestPlotAreaRecord {
     byte[] data = new byte[] {
 
     };
index 444dbf659aa1282b69d659674cd815820c8e0756..30435c76b7e4770f7ce7ed09f708fa3df11e8415 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestPlotGrowthRecord {
+final class TestPlotGrowthRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00,    // horizontal
         (byte)0x00,(byte)0x00,(byte)0x01,(byte)0x00     // vertical
index 162ac4b3964bea7849adfed2b57dd72e5706bc3c..1c6e886c9062c2fac1bdc47e4e6c26122fe885e7 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestSeriesChartGroupIndexRecord {
+final class TestSeriesChartGroupIndexRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00
     };
index ddd1a01fad8d8fd1f4d9c0ac97adb3855bc0d8a1..b4bad1d1915818ebd6ae58ffc48b8e430adc027e 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestSeriesIndexRecord {
+final class TestSeriesIndexRecord {
     byte[] data = new byte[] {
        (byte)0x03,(byte)0x00
     };
index b0e51325a50a8715c200990161cb042fbf4454cb..f20184d3ba6f6ae62531888e91814d93fd24cb48 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestSeriesLabelsRecord {
+final class TestSeriesLabelsRecord {
     byte[] data = new byte[] {
         (byte)0x03,(byte)0x00
     };
index ad8a3f2617546662995df838adf24d89464dd3dc..b75c5791472217654000c80660e77470126376ce 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestSeriesListRecord {
+final class TestSeriesListRecord {
     private static final byte[] data = {
         (byte)0x02,(byte)0x00,(byte)0x01,(byte)0x20,(byte)0xff,(byte)0xf0
     };
index 5f76b07a398a94ce4a3a63325654868707031614..8aac948d0ce29d3aa72b87c828e3ccfa6160ab30 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestSeriesRecord {
+final class TestSeriesRecord {
     byte[] data = new byte[] {
         (byte)0x01,(byte)0x00,      // category data type
         (byte)0x01,(byte)0x00,      // values data type
index 4e698a5c9e5073c2a19d962ee3069d3b14f3ab21..6e56904996bb2df786cf0acc594579658a32c2d3 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  * Tests the serialization and deserialization of the SeriesTextRecord class
  * works correctly. Test data taken directly from a real Excel file.
  */
-public final class TestSeriesTextRecord {
+final class TestSeriesTextRecord {
        private static final byte[] SIMPLE_DATA = HexRead
                        .readFromString("00 00 0C 00 56 61 6C 75 65 20 4E 75 6D 62 65 72");
 
index b918c7d2a2118c59a011e159585da664242aae1c..21f03302c6c74405e78c9d3142d908e44540a296 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  * Tests for {@link SheetPropertiesRecord}
  * Test data taken directly from a real Excel file.
  */
-public final class TestSheetPropertiesRecord {
+final class TestSheetPropertiesRecord {
     private static final byte[] data = {
         (byte)0x0A,(byte)0x00,
         (byte)0x00,
index bcedd6e64843106944f01638276f86e0602eaa5e..7628d9ce4f35dcd8c9beea1c137d9f0c3b302541 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestTextRecord {
+final class TestTextRecord {
     byte[] data = new byte[] {
         (byte)0x02,                                          // horiz align
         (byte)0x02,                                          // vert align
index c6ab270fbdc03a4e7e548736a86479b4dade8209..dc1a0405bdb17efe6bfc9c6209e6bc52c66b0838 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestTickRecord {
+final class TestTickRecord {
     private static final byte[] data = {
         (byte)0x02, (byte)0x00, (byte)0x03, (byte)0x01,
         (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
index 33973f3ab2b6a4126dc6653744ab26ac9a17c367..8d1294fa9be1ee01398f0fa8b7c92f8ccbd8f475 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestUnitsRecord {
+final class TestUnitsRecord {
     byte[] data = new byte[] {
         (byte)0x00, (byte)0x00
     };
index f0bfff23008adfbb7c4e6c8465989383dfd889ef..0dc470d417204b0c807c4053c3509eeab1063abb 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  * class works correctly.  Test data taken directly from a real
  * Excel file.
  */
-public final class TestValueRangeRecord {
+final class TestValueRangeRecord {
     byte[] data = new byte[] {
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,     // min axis value
         (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x00,     // max axis value
index 400b8694dfbc1f24c3b7d975c24480c88a98ef6f..45151b90ffc0b03cfadd8ec9e0ed6c85739477a5 100644 (file)
@@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Jason Height (jheight at apache.org)
  */
-public final class TestUnicodeString {
+final class TestUnicodeString {
     private static final int MAX_DATA_SIZE = RecordInputStream.MAX_RECORD_DATA_SIZE;
 
     /** a 4 character string requiring 16 bit encoding */
index e810bb94b2faa62660fdb7907c5624510bfba5ea..3cfe1dc277c652bbeafeb9b0fbe88eef1bff7e12 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link ExtendedPivotTableViewFieldsRecord}
  */
-public final class TestExtendedPivotTableViewFieldsRecord {
+final class TestExtendedPivotTableViewFieldsRecord {
 
        @Test
        void testSubNameNotPresent_bug46693() {
index afebcc4ec53a71774bd54a874e616009c76ba307..ff6ac5d0190a9e391cda34086f64ef4e202fb443 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link PageItemRecord}
  */
-public final class TestPageItemRecord {
+final class TestPageItemRecord {
        @Test
        void testMoreThanOneInfoItem_bug46917() {
                byte[] data = HexRead.readFromString("01 02 03 04 05 06 07 08 09 0A 0B 0C");
index a0898efa64f0b397e2f603ef2091c7440aecd989..ee05e1a4f4ae682cf9a5faa93591a84cf30404a6 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link ViewFieldsRecord}
  */
-public final class TestViewFieldsRecord {
+final class TestViewFieldsRecord {
 
        @Test
        void testUnicodeFlag_bug46693() {
index f8f0b52e1c1028e8e415a3013c629078370fdbd4..8a3008cb45a2bc63a60cacffde02a04c8ba6f2cd 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  *
  */
-public final class TestBug42464 {
+final class TestBug42464 {
 
     @Test
        void testOKFile() throws Exception {
index a6347fbe57e0fecdf8f0b4dda8da1e08f332e8a3..b30f9f71ec820ca39160d5003a891ab77ad11c4d 100644 (file)
@@ -101,7 +101,7 @@ import org.junit.jupiter.params.provider.CsvSource;
  * <b>YK: If a bug can be tested in terms of common ss interfaces,
  * define the test in the base class {@link BaseTestBugzillaIssues}</b>
  */
-public final class TestBugs extends BaseTestBugzillaIssues {
+final class TestBugs extends BaseTestBugzillaIssues {
 
     public TestBugs() {
         super(HSSFITestDataProvider.instance);
index d8737756834be9039673a5605ea2c002fe43df64..d80f0003681d05ecf9d581d41808c3bb483b1aad 100644 (file)
@@ -55,7 +55,7 @@ import org.junit.jupiter.api.Test;
  * Class to test cell styling functionality
  */
 
-public final class TestCellStyle {
+final class TestCellStyle {
 
     private static HSSFWorkbook openSample(String sampleFileName) {
         return HSSFTestDataSamples.openSampleWorkbook(sampleFileName);
index 421b6e0061e3430a880622c1210eb3745c89de4b..cb3d92d113068981b6a37f305cd4f404d08419ff 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
  *  add that record to the sheet in the testCloneSheetBasic method.
  * @author  avik
  */
-public final class TestCloneSheet extends BaseTestCloneSheet {
+final class TestCloneSheet extends BaseTestCloneSheet {
     public TestCloneSheet() {
         super(HSSFITestDataProvider.instance);
     }
index f8426f92488ffad6b8f2245bfa76f6f7f5560ad4..4a120b2ac6613782815b8da704e63c5624d2932e 100644 (file)
@@ -53,7 +53,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Dragos Buleandra ( dragos.buleandra@trade2b.ro )
  */
-public final class TestDataValidation extends BaseTestDataValidation {
+final class TestDataValidation extends BaseTestDataValidation {
 
     public TestDataValidation(){
         super(HSSFITestDataProvider.instance);
index 27a12e2d9ea4b2f05a5fb41221a639e9b2191157..3ddac1b794e11e032b47a4835f23573d6c78544d 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
  *  one anchored at 0,0,1022,255 and another anchored
  *  at 20,30,500,200
  */
-public final class TestEscherGraphics {
+final class TestEscherGraphics {
        private HSSFWorkbook workbook;
        private HSSFPatriarch patriarch;
     private HSSFShapeGroup escherGroupA;
index 9e4422bdbd2bf87d95107a1d1b2f218883e139c9..e6aaf092b62c0bbff2576936906f86a99fc42555 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the Graphics2d drawing capability.
  */
-public final class TestEscherGraphics2d {
+final class TestEscherGraphics2d {
     private HSSFWorkbook workbook;
        private HSSFShapeGroup escherGroup;
        private EscherGraphics2d graphics;
index 30b358c9efbb11c95cc2740f9162a2ca374cfbef..7341a43b1fd514011f378d79e809edbccf4bb5d9 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the implementation of the FontDetails class.
  */
-public final class TestFontDetails {
+final class TestFontDetails {
     private FontDetails fontDetails;
 
     @BeforeEach
index 1bb3585e89929243db03462558035b0e7012e8f9..0ddc016d296a889391b4ac89f8aee2c488a33fb3 100644 (file)
@@ -26,7 +26,6 @@ import static org.junit.jupiter.api.Assertions.fail;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.util.Calendar;
-import java.util.Iterator;
 
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.hssf.record.FormulaRecord;
@@ -54,7 +53,7 @@ import org.junit.jupiter.api.Test;
 /**
  *
  */
-public final class TestFormulaEvaluatorBugs {
+final class TestFormulaEvaluatorBugs {
     private static boolean OUTPUT_TEST_FILES;
     private static String tmpDirName;
 
index 046a08ff86ee4d206f8c18b447dc766d3bb78503..ef8cd2538af5919b774710c953067614e7e71e19 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  *  https://poi.apache.org/hssf/eval.html
  * all actually works as we'd expect them to
  */
-public final class TestFormulaEvaluatorDocs {
+final class TestFormulaEvaluatorDocs {
 
        /**
         * https://poi.apache.org/hssf/eval.html#EvaluateAll
index ac85a2d2737ccd35d55b9b2f7ea8a28ddcdc743a..836ed32bae3d85661ac3aa43bd3f7d61a5cb6f54 100644 (file)
@@ -43,7 +43,7 @@ import org.apache.poi.util.LocaleUtil;
 import org.apache.poi.util.TempFile;
 import org.junit.jupiter.api.Test;
 
-public final class TestFormulas {
+final class TestFormulas {
 
     private static HSSFWorkbook openSample(String sampleFileName) {
         return HSSFTestDataSamples.openSampleWorkbook(sampleFileName);
index c140e905ceb7102879478fb74a6826fc312af536..57f0fbc19dd933be2ec82c213c4bdcf8fe176342 100644 (file)
@@ -51,7 +51,7 @@ import org.junit.jupiter.api.Test;
  * Tests various functionality having to do with {@link HSSFCell}.  For instance support for
  * particular datatypes, etc.
  */
-public final class TestHSSFCell extends BaseTestCell {
+final class TestHSSFCell extends BaseTestCell {
 
        public TestHSSFCell() {
                super(HSSFITestDataProvider.instance);
index 64d029fca8b6eb0ebf1c8dda2459182259debc19..a6555e3f6c28f20c32265531780433388c3270e9 100644 (file)
@@ -26,7 +26,6 @@ import static org.junit.jupiter.api.Assertions.assertNull;
 import java.io.IOException;
 
 import org.apache.poi.hssf.HSSFITestDataProvider;
-import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.hssf.record.chart.SeriesRecord;
 import org.apache.poi.hssf.usermodel.HSSFChart.HSSFSeries;
 import org.apache.poi.ss.util.CellRangeAddress;
@@ -36,7 +35,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link HSSFChart}
  */
-public final class TestHSSFChart {
+final class TestHSSFChart {
 
        @Test
        void testSingleChart() {
index 8c9dbe6cc959d91af29c7297dd4778ac2762d6ff..1cc79736c1a94941408d83080edce76417af3883 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Various tests for HSSFClientAnchor.
  */
-public final class TestHSSFClientAnchor {
+final class TestHSSFClientAnchor {
     @Test
     void testGetAnchorHeightInPoints() throws IOException {
         try (HSSFWorkbook wb = new HSSFWorkbook()) {
index 673849b8ef99f631f442629c65ea99baca41b1dc..0068f983050afbb6a8f44568434909bcba29b7be 100644 (file)
@@ -51,7 +51,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author  Yegor Kozlov
  */
-public final class TestHSSFComment extends BaseTestCellComment {
+final class TestHSSFComment extends BaseTestCellComment {
 
     public TestHSSFComment() {
         super(HSSFITestDataProvider.instance);
index 9bb01384b17a6a3435572873c0213c497c2cb593..b6a472ad3841ae92257542bf39359ea116176a4f 100644 (file)
@@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test;
 /**
  * HSSF-specific Conditional Formatting tests
  */
-public final class TestHSSFConditionalFormatting extends BaseTestConditionalFormatting {
+final class TestHSSFConditionalFormatting extends BaseTestConditionalFormatting {
     public TestHSSFConditionalFormatting(){
         super(HSSFITestDataProvider.instance);
     }
index 0f1b6a46a14b59e107d14bc5fbf4a976777907ec..1ebca4a34dfd394dd5dd0758ed232406484492cf 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link HSSFDataFormat}
  */
-public final class TestHSSFDataFormat extends BaseTestDataFormat {
+final class TestHSSFDataFormat extends BaseTestDataFormat {
     private static final POILogger _logger = POILogFactory.getLogger(TestHSSFDataFormat.class);
 
     public TestHSSFDataFormat() {
index cb897c6c2e1105d5934daba0f0eb228fb6eb1b9b..552e028aff16b25339b0d8175f380596dfff1723 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.ss.formula.BaseTestExternalFunctions;
 /**
  * Tests setting and evaluating user-defined functions in HSSF
  */
-public final class TestHSSFExternalFunctions extends BaseTestExternalFunctions {
+final class TestHSSFExternalFunctions extends BaseTestExternalFunctions {
        public TestHSSFExternalFunctions() {
                super(HSSFITestDataProvider.instance, "atp.xls");
        }
index 541b34708ab2f7ccf0983a377d9e765a27f25c36..e4859923ff95225d9518d6912e9fe528b8ae8d58 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.params.provider.Arguments;
 /**
  * Tests various functionality having to do with {@link org.apache.poi.ss.usermodel.Name}.
  */
-public final class TestHSSFFont extends BaseTestFont {
+final class TestHSSFFont extends BaseTestFont {
 
     public TestHSSFFont() {
         super(HSSFITestDataProvider.instance);
index 9ddc17a9f3b291c57a51c81d7e33a52d2d25ffc2..afe96936fdd82fee2274b650e3495f640a290180 100644 (file)
@@ -39,7 +39,7 @@ import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.junit.jupiter.api.Test;
 
-public final class TestHSSFFormulaEvaluator extends BaseTestFormulaEvaluator {
+final class TestHSSFFormulaEvaluator extends BaseTestFormulaEvaluator {
 
     public TestHSSFFormulaEvaluator() {
         super(HSSFITestDataProvider.instance);
index cb4178ab7a76677e22fcecd4c4c6a6d0be6afdc0..a104bba25f8511ee2bb58a9fac20a23ccc5b7399 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link HSSFHeader} / {@link HSSFFooter}
  */
-public final class TestHSSFHeaderFooter {
+final class TestHSSFHeaderFooter {
 
        /**
         * Tests that get header retrieves the proper values.
index e5e9deb6922d8bc2f1a06a8de7e1afd5859b5c79..67cb04010d29d0ab76f0dac1f5f0db366dc1b797 100644 (file)
@@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author  Yegor Kozlov
  */
-public final class TestHSSFHyperlink extends BaseTestHyperlink {
+final class TestHSSFHyperlink extends BaseTestHyperlink {
 
     public TestHSSFHyperlink() {
         super(HSSFITestDataProvider.instance);
index 1a58009863219845ee3059386df684e052a23c67..95364a33c25e182df7fea14f26e74ed4e2960cfd 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.junit.jupiter.api.Test;
 
-public final class TestHSSFOptimiser {
+final class TestHSSFOptimiser {
     @Test
     void testDoesNoHarmIfNothingToDo() {
         HSSFWorkbook wb = new HSSFWorkbook();
index 088bcf0e6bdac10c8c81b85a9393caa091a3667c..1f6460e9203436320fb864ed4d68b52dd4fb7125 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.poi.ss.usermodel.Font;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public final class TestHSSFPalette {
+final class TestHSSFPalette {
     private HSSFPalette _hssfPalette;
 
 
index 5d4608a7c1b4842cc7113244dad75e39f85558ac..64b91fc5166c0cb7b0e1480000331a21d7b2bcc5 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.ss.usermodel.ClientAnchor.AnchorType;
 import org.junit.jupiter.api.Test;
 
-public final class TestHSSFPatriarch {
+final class TestHSSFPatriarch {
 
        @Test
        void testBasic() throws IOException {
index 471ab0c601f6bb91b866eab9415b84817faf90f2..98b32575c8c5a65cdaabe01d3843e9fdfe6bb5aa 100644 (file)
@@ -39,7 +39,7 @@ import org.apache.poi.ss.usermodel.PictureData;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.junit.jupiter.api.Test;
 
-public final class TestHSSFPicture extends BaseTestPicture {
+final class TestHSSFPicture extends BaseTestPicture {
 
     public TestHSSFPicture() {
         super(HSSFITestDataProvider.instance);
index b2f767465bdd45eeee3ed0686bd4b788d1aad167..dd1de44da96ad2370cd085ddd207e7bb6d510270 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
  * Test <code>HSSFPictureData</code>.
  * The code to retrieve images from a workbook provided by Trejkaz (trejkaz at trypticon dot org) in Bug 41223.
  */
-public final class TestHSSFPictureData {
+final class TestHSSFPictureData {
     @BeforeAll
     public static void setUpClass() {
         final String tmpDirProperty = System.getProperty("java.io.tmpdir");
index 45c084e47d1c043dd9debc98c2c0a987db6fd7a9..44ae5b4fcf00719b51ce2b6a8ee8ac2b837734e7 100644 (file)
@@ -21,7 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import org.junit.jupiter.api.Test;
 
-public final class TestHSSFRichTextString {
+final class TestHSSFRichTextString {
     @Test
     void testApplyFont() {
         HSSFRichTextString r = new HSSFRichTextString("testing");
index ce0cdcb4b8a9cb06b66c74e0244d3af38db2573e..b588f1375c1d6dbdbd56bbea812c1e52c7d7818d 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Glen Stampoultzis (glens at apache.org)
  */
-public final class TestHSSFRow extends BaseTestRow {
+final class TestHSSFRow extends BaseTestRow {
 
     public TestHSSFRow() {
         super(HSSFITestDataProvider.instance);
index 358b44fa546f4a24f080305774ae7e372f42d2c0..b6c9c918d21468237230834cca1f4fb8da3450bd 100644 (file)
@@ -56,7 +56,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests HSSFSheet.  This test case is very incomplete at the moment.
  */
-public final class TestHSSFSheet extends BaseTestSheet {
+final class TestHSSFSheet extends BaseTestSheet {
 
     public TestHSSFSheet() {
         super(HSSFITestDataProvider.instance);
index 7538d4acbb7914d01b144a88eebe9121cd757c18..5f9f0fb24698b0da4e1239fac4d6c4ece9d2c07b 100644 (file)
 package org.apache.poi.hssf.usermodel;
 
 import org.apache.poi.hssf.HSSFITestDataProvider;
-import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.BaseTestSheetAutosizeColumn;
 
 /**
  * Test auto-sizing columns in HSSF
  *
  * @author Yegor Kozlov
  */
-public final class TestHSSFSheetAutosizeColumn extends BaseTestSheetAutosizeColumn {
+final class TestHSSFSheetAutosizeColumn extends BaseTestSheetAutosizeColumn {
 
     public TestHSSFSheetAutosizeColumn() {
         super(HSSFITestDataProvider.instance);
index 8c4c08d4faf56aa84d5aefe9c293cbf58612bb23..d78c3bf660ebd80e7f5439f6799677f653a4f342 100644 (file)
@@ -23,7 +23,7 @@ import org.apache.poi.ss.usermodel.BaseTestSheetShiftRows;
 /**
  * @author Yegor Kozlov
  */
-public final class TestHSSFSheetShiftRows extends BaseTestSheetShiftRows {
+final class TestHSSFSheetShiftRows extends BaseTestSheetShiftRows {
 
     public TestHSSFSheetShiftRows() {
         super(HSSFITestDataProvider.instance);
index 9142347640a69c7342abb8d9c873843d1786f52d..33f6607988d6507ba995478fbb72dd5a17caba06 100644 (file)
@@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test array formulas in HSSF
  */
-public final class TestHSSFSheetUpdateArrayFormulas extends BaseTestSheetUpdateArrayFormulas {
+final class TestHSSFSheetUpdateArrayFormulas extends BaseTestSheetUpdateArrayFormulas {
 
     public TestHSSFSheetUpdateArrayFormulas() {
         super(HSSFITestDataProvider.instance);
index 692c487a31aca6ebcd608d826db39f91bbe523af..5d08d77e4c08abc674fc19b16c79a6812f313e13 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test <code>HSSFTextbox</code>.
  */
-public final class TestHSSFTextbox {
+final class TestHSSFTextbox {
 
     /**
      * Test that accessors to horizontal and vertical alignment work properly
index 3ccd2a9e4307dbc96a7751707f6b5e9057e9f35d..6d5a9da58ad74b5efa92c67c6e16bfe44b24b3d5 100644 (file)
@@ -44,7 +44,7 @@ import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
 
-public final class TestMatrixFormulasFromBinarySpreadsheet {
+final class TestMatrixFormulasFromBinarySpreadsheet {
 
     private static final POILogger LOG = POILogFactory.getLogger(TestMatrixFormulasFromBinarySpreadsheet.class);
 
index 4a8bfc97e12382d010c8702e703858fe13311435..6f8bc8dfbb6ca559da7a0c05c1e7d82e412d58a7 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
  *  with a WORKBOOK or BOOK directory entry (instead of
  *  the more usual, Workbook)
  */
-public final class TestNonStandardWorkbookStreamNames {
+final class TestNonStandardWorkbookStreamNames {
        private final String xlsA = "WORKBOOK_in_capitals.xls";
     private final String xlsB = "BOOK_in_capitals.xls";
 
index b7f67c84d49e8cac2dc7145cc284818ac1079378..1183c5f6b5a9002b673ff47df67b25123bfa24a9 100644 (file)
@@ -37,7 +37,7 @@ import org.apache.poi.ss.usermodel.CreationHelper;
 import org.apache.poi.util.LocaleUtil;
 import org.junit.jupiter.api.Test;
 
-public final class TestOLE2Embeding {
+final class TestOLE2Embeding {
 
     @Test
     void testEmbeding() throws Exception {
index 44bd3d8caad569ff42e07beb1cf27498493951f0..f1e9f0ef1f56fd6be9700956ccb4028ed91c4be4 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * @author Glen Stampoultzis (glens at apache.org)
  */
-public final class TestReadWriteChart {
+final class TestReadWriteChart {
 
     /**
      * In the presence of a chart we need to make sure BOF/EOF records still exist.
index 36fb392f741035fbad93274e2575d07ab8ac46b9..5bde759a5c00fcf36e5bf969454defffb71af9e8 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test row styling functionality
  */
-public final class TestRowStyle {
+final class TestRowStyle {
 
     /**
      * TEST NAME:  Test Write Sheet Font <P>
index b77f98edfb44f975ae46312da19f17c1f036fd3f..428fb3030eb230b678387358679a141dfb7e409a 100644 (file)
@@ -18,7 +18,6 @@
 package org.apache.poi.hssf.usermodel;
 
 import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -39,7 +38,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Glen Stampoultzis (glens at apache.org)
  */
-public final class TestSanityChecker {
+final class TestSanityChecker {
        private static final Record INTERFACEHDR = new InterfaceHdrRecord(InterfaceHdrRecord.CODEPAGE);
        private static BoundSheetRecord createBoundSheetRec() {
                return new BoundSheetRecord("Sheet1");
index 5a1e8f05b10a61a7a7080f0dc2d2600491cf96ab..2bda96ce2c645b057eae82835a96fa6cb6f1d2a0 100644 (file)
 
 package org.apache.poi.hssf.usermodel;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import org.apache.poi.hssf.HSSFITestDataProvider;
 import org.apache.poi.hssf.model.InternalWorkbook;
 import org.apache.poi.ss.usermodel.BaseTestSheetHiding;
 import org.apache.poi.ss.usermodel.SheetVisibility;
 import org.junit.jupiter.api.Test;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
-
-public final class TestSheetHiding extends BaseTestSheetHiding {
+final class TestSheetHiding extends BaseTestSheetHiding {
     public TestSheetHiding() {
         super(HSSFITestDataProvider.instance,
                 "TwoSheetsOneHidden.xls", "TwoSheetsNoneHidden.xls");
index 855d82eec25b5747f1c32e8f3cc43561d134cd0a..76701fd1dd3e6f4ca7da7616d1e167b4ee6e095c 100644 (file)
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
  * Bugzilla id's PLEASE MOVE tests from this class to TestBugs once the bugs are
  * fixed, so that they are then run automatically.
  */
-public final class TestUnfixedBugs {
+final class TestUnfixedBugs {
     @Test
     void testFormulaRecordAggregate_1() throws Exception {
         // fails at formula "=MEHRFACH.OPERATIONEN(E$3;$B$5;$D4)"
index ec5d519275614d1c6877feab73ee094636193b39..1ced954a27145086c26711e798c19580eb5d736d 100644 (file)
@@ -25,7 +25,7 @@ import java.io.IOException;
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.junit.jupiter.api.Test;
 
-public final class TestUnicodeWorkbook {
+final class TestUnicodeWorkbook {
 
     /**
      *  Tests Bug38230
index 4d2f395b23725c064c6de71450cd6f37ea495f34..e3ca2f42475dd77ab7d76c19c069ca3a26fb365d 100644 (file)
 
 package org.apache.poi.hssf.usermodel;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import java.io.IOException;
 
 import org.apache.poi.hssf.HSSFTestDataSamples;
@@ -24,16 +30,19 @@ import org.apache.poi.hssf.model.InternalWorkbook;
 import org.apache.poi.hssf.record.BackupRecord;
 import org.apache.poi.hssf.record.LabelSSTRecord;
 import org.apache.poi.hssf.record.aggregates.RecordAggregate.RecordVisitor;
-import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.Name;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.junit.jupiter.api.Test;
 
-import static org.junit.jupiter.api.Assertions.*;
-
 /**
  * Class to test Workbook functionality
  */
-public final class TestWorkbook {
+final class TestWorkbook {
     private static final String LAST_NAME_KEY        = "lastName";
     private static final String FIRST_NAME_KEY       = "firstName";
     private static final String SSN_KEY              = "ssn";
index 24bbe95c70431e1d8ce20ddb8e8ae2c7add5e78d..1fe92ec0224422e6b0e5125e26c39b4547ab1d86 100644 (file)
@@ -46,7 +46,7 @@ import org.apache.poi.ss.util.AreaReference;
 import org.apache.poi.ss.util.CellReference;
 import org.junit.jupiter.api.Test;
 
-public final class TestAreaReference {
+final class TestAreaReference {
 
     @Test
     void testAreaRef1() {
index d0b197d7dbd2090022891da8b52e4f6404f34371..f761e251dd8167c4c0fbfefd4aeba463d01b52a8 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  * Tests for the HSSF and SS versions of CellReference.
  * See also {@link org.apache.poi.ss.util.TestCellReference}
  */
-public final class TestCellReference {
+final class TestCellReference {
     @Test
     void testColNumConversion() {
         assertEquals(0, CellReference.convertColStringToIndex("A"));
index 64cbd3df06774f540b9a75c219aeea71b3067d69..ff3ec062776a7cdd687f63724f6e23f27b229782 100644 (file)
@@ -25,7 +25,7 @@ import java.util.Map;
 import org.apache.poi.hssf.util.HSSFColor.HSSFColorPredefined;
 import org.junit.jupiter.api.Test;
 
-public final class TestHSSFColor {
+final class TestHSSFColor {
     @Test
     void testBasics() {
                assertTrue(HSSFColorPredefined.YELLOW.getIndex() > 0);
index a976666e57843db59ecf999f35437fb3328067bf..15190f93ab3a589b841cc1f5f71325cbebab8915 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests the {@link RKUtil} class.
  */
-public final class TestRKUtil {
+final class TestRKUtil {
 
        /**
         * Check we can decode correctly.
index fc6e613ef56ee636820c05c2b5283d1c148b5f0a..959565cfebf5680bc75e48643411d1f5fe00772f 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link Biff8DecryptingStream}
  */
-public final class TestBiff8DecryptingStream {
+final class TestBiff8DecryptingStream {
 
        /**
         * A mock {@link InputStream} that keeps track of position and also produces
index cad76dd749ea99114376226d0e4459c039ecbe5f..1eb939f9618794f0bbff9dac0bcced2f0baa331c 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Marc Johnson
  */
-public final class TestPOIFSReaderRegistry {
+final class TestPOIFSReaderRegistry {
     private final POIFSReaderListener[] listeners =
     {
         new Listener(), new Listener(), new Listener(), new Listener()
index b9642326fa41c816f7ae9f527723fb56971a9bc1..9212aa6c8fdebb166bebf859fd126c48041b107c 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test DirectoryNode functionality
  */
-public final class TestDirectoryNode {
+final class TestDirectoryNode {
 
     /**
      * test trivial constructor (a DirectoryNode with no children)
index 17a2fb9def3531a73dd5a569e18cd565cd1a9853..17c1b572d5d32e4786e0d99b969d5cef9aed1676 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test DocumentDescriptor functionality
  */
-public final class TestDocumentDescriptor {
+final class TestDocumentDescriptor {
 
     /**
      * test equality
index 27bb00974a0e226470c90f7f6eeae309f6a95170..c0d4de13534789915247ddf25a6551680df70c22 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test DocumentInputStream functionality
  */
-public final class TestDocumentInputStream {
+final class TestDocumentInputStream {
     private DocumentNode _workbook_n;
     private byte[] _workbook_data;
     private static final int _workbook_size = 5000;
index dadd8dd9446e01967d411d132258b3a417141859..d2815e02542e514ebf30a75e9870581516006a49 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test DocumentOutputStream functionality
  */
-public final class TestDocumentOutputStream {
+final class TestDocumentOutputStream {
 
     /**
      * test write(int) behavior
index f83572b2f4f9c2df38b81485b7dca92f935a2ec9..b44b5d5d53f9851f337bbba5ecf30ea0e3d4d2d6 100644 (file)
@@ -29,7 +29,7 @@ import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 import org.junit.jupiter.api.Test;
 
-public final class TestEmptyDocument {
+final class TestEmptyDocument {
     private static final POILogger LOG = POILogFactory.getLogger(TestEmptyDocument.class);
 
     @Test
index 42028da91dad709091f1b8757b27ab041db34bcb..ef504aca69c958cacbe8b61035e9977e49418792 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests bugs for POIFSFileSystem
  */
-public final class TestFileSystemBugs {
+final class TestFileSystemBugs {
     private static final POIDataSamples _samples = POIDataSamples.getPOIFSInstance();
     private static final POIDataSamples _ssSamples = POIDataSamples.getSpreadSheetInstance();
 
index 8297eb1606713816fdf6d720542c8b2ee720d15b..aa9c8883af55a2d052bc50d6e6cbbfc21286dbef 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test FilteringDirectoryNode functionality
  */
-public final class TestFilteringDirectoryNode {
+final class TestFilteringDirectoryNode {
     private POIFSFileSystem fs;
     private DirectoryEntry dirA;
     private DirectoryEntry dirAA;
index 1d6fbcb9332c7609117e73c06956c1b954009ed4..94d8e73e9c669e84aec4c9f1c708645afd49e544 100644 (file)
@@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.util.Arrays;
 
@@ -31,7 +30,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test POIFSDocumentPath functionality
  */
-public final class TestPOIFSDocumentPath {
+final class TestPOIFSDocumentPath {
 
 
     /**
index 2bf0493cb946e43357e639c6a8c85c590e2c8da1..8682bad46bae278d692e6804a4af8268fbaba3d9 100644 (file)
@@ -46,7 +46,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for the older OPOIFS-based POIFSFileSystem
  */
-public final class TestPOIFSFileSystem {
+final class TestPOIFSFileSystem {
    private final POIDataSamples _samples = POIDataSamples.getPOIFSInstance();
 
        /**
index 98493fb530a71efdf447f06082f31cd90fee0e1f..fcc1e4bcf1ed87801697089041f39b9b8ef0c77b 100644 (file)
@@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.ByteArrayInputStream;
 import java.nio.ByteBuffer;
@@ -38,7 +37,7 @@ import org.junit.jupiter.api.Test;
  * Tests for the Mini Store in the NIO POIFS
  */
 @SuppressWarnings("CatchMayIgnoreException")
-public final class TestPOIFSMiniStore {
+final class TestPOIFSMiniStore {
     private static final POIDataSamples _inst = POIDataSamples.getPOIFSInstance();
 
     /**
index 07cccaf1b829ef66862dc8b255c50c035f1693b2..2a2a8122d18a15c23423f3af10ee11c719792def 100644 (file)
@@ -26,7 +26,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 import java.io.ByteArrayInputStream;
@@ -60,7 +59,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests {@link POIFSStream}
  */
-public final class TestPOIFSStream {
+final class TestPOIFSStream {
     private static final POIDataSamples _inst = POIDataSamples.getPOIFSInstance();
 
     /**
index 7e54151c8ee901d7b029bbdc3a0cc86c08c6866a..29ed3001f03569399f543ffa1d00fbd93c711e7b 100644 (file)
@@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test;
  * See bug 39234 in bugzilla. Thanks to Bill Seddon for providing the solution.
  * </p>
  */
-public final class TestPropertySorter {
+final class TestPropertySorter {
 
     //the correct order of entries in the test file
     private static final String[] _entries = {
index 1cc6b85c190a6a2d6e19366470adbe33c7e45621..49b6553012d2027728b7013e58ab543c0170e040 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test DirectoryProperty functionality
  */
-public final class TestDirectoryProperty {
+final class TestDirectoryProperty {
     private DirectoryProperty _property;
     private byte[]            _testblock;
 
index ee538cb561f70910d28b55ea091f695a669cf6e9..17145cd9db59ffda7588f208c9a013837b91c46e 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test DocumentProperty functionality
  */
-public final class TestDocumentProperty {
+final class TestDocumentProperty {
 
     @Test
     void testConstructor() throws IOException {
index c141bc344c2a656847655747c4f0ef608572a2f4..6d67310ff67263da0751152dd877020091d79675 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test PropertyFactory functionality
  */
-public final class TestPropertyFactory {
+final class TestPropertyFactory {
 
     @Test
     void testConvertToProperties() throws IOException {
index 3ec51c918ecb7c16a1e002b5eb066c5893348222..e6ce6610f5ec587ac6a1f708fb6b813c99e44e62 100644 (file)
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test PropertyTable functionality
  */
-public final class TestPropertyTable {
+final class TestPropertyTable {
 
        private static void confirmBlockEncoding(String expectedDataStr, PropertyTable table) throws IOException {
                final ByteArrayOutputStream bos = new ByteArrayOutputStream();
index 19de78ceeb980fc35bbaae1ec89ff23eb59ff6a8..4b311a8ec888fe986c8632319b1d9f02c4746cf9 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Marc Johnson
  */
-public final class TestRootProperty {
+final class TestRootProperty {
        private RootProperty _property;
        private byte[] _testblock;
 
index 40cb3c787e1ce1ce9f4b32b3a96a2241e368a855..8190b151b6c14d310d0165736577d7f13f6a13ba 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test BATBlock functionality
  */
-public final class TestBATBlock {
+final class TestBATBlock {
 
 
     @Test
index 9c30f75d9af99f453435d9d90ead657c0bd9adf8..bb08ae3965ea962ac077898a10c0d84ffed64b80 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test HeaderBlockReader functionality
  */
-public final class TestHeaderBlockReading {
+final class TestHeaderBlockReading {
 
        @Test
        void testConstructors() throws IOException {
index 71f5a843b40a0f8f2861de4235d08684fa7c4550..4da0ab5b054508421771f7a9f58145261735b203 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Check that all enum values are properly set
  */
-public final class TestSpreadsheetVersion {
+final class TestSpreadsheetVersion {
 
     @Test
     void testExcel97(){
index 51d3f5742d16030c8206b8771d3feae46b74abb2..37e2131ee0b192b1692e079a81d012ac58dc9af0 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link FormulaShifter}.
  */
-public final class TestFormulaShifter {
+final class TestFormulaShifter {
     // Note - the expected result row coordinates here were determined/verified
     // in Excel 2007 by manually testing.
 
index f96b2a824f9fe6c5e667cfefe4dc04513b74062b..484e5597cbd2de8a797b390973f55ed42c52c29d 100644 (file)
 
 package org.apache.poi.ss.formula;
 
-import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.IOException;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
+import org.junit.jupiter.api.Test;
 
 /**
  * Tests for {@link SheetNameFormatter}
  *
  * @author Josh Micich
  */
-public final class TestSheetNameFormatter {
+final class TestSheetNameFormatter {
        /**
         * Tests main public method 'format'
         */
index 29747bebd46044a31413ffe62a1c02550c25f460..57875af9cd70aacb83df2995db99e9c65239be3e 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Specific test cases for YearFracCalculator
  */
-public final class TestYearFracCalculator {
+final class TestYearFracCalculator {
 
     @Test
        void testBasis1() {
index e556858e7ad2f6a2b3cb5841a96370105746bef3..1ac4f2576b931addb6f9adee1a1742d84a5ec7fe 100644 (file)
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests YearFracCalculator using test-cases listed in a sample spreadsheet
  */
-public final class TestYearFracCalculatorFromSpreadsheet {
+final class TestYearFracCalculatorFromSpreadsheet {
 
        private static final class SS {
 
index 46ddea521bcd9ae8d64bba4da556cca33f61879b..0f9c0ee60a7bab5c497abf50e949e78eb83ff9a9 100644 (file)
@@ -29,7 +29,7 @@ import org.apache.poi.util.LittleEndianByteArrayOutputStream;
 import org.apache.poi.util.LittleEndianInput;
 import org.junit.jupiter.api.Test;
 
-public final class TestConstantValueParser {
+final class TestConstantValueParser {
        private static final Object[] SAMPLE_VALUES = {
                        Boolean.TRUE,
                        null,
index 8f8f13669561abe0ac7c220b7519fcce125f3491..40b9a097150bc9565f3887959487b28c2131b06f 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for <tt>AreaEval</tt>
  */
-public final class TestAreaEval {
+final class TestAreaEval {
 
        @Test
        void testGetValue_bug44950() {
index 092d6fbd558298990b66040d32b1e698a56a2039..3155ba5b37ea5a5e63ecf2d66479a715327e2fc8 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test for divide operator evaluator.
  */
-public final class TestDivideEval {
+final class TestDivideEval {
 
        private static void confirm(ValueEval arg0, ValueEval arg1, double expectedResult) {
                ValueEval[] args = {
index f67b6dbce09af550e03a631dff573fafe9a8d2b2..8d8e29f2f0d9b0ea22faa4c6236c678982f01247 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test for EqualEval
  */
-public final class TestEqualEval {
+final class TestEqualEval {
        /**
         * Test for bug observable at svn revision 692218 (Sep 2008)<br>
         * The value from a 1x1 area should be taken immediately, regardless of srcRow and srcCol
index ee9da53893677c6edead7fd206e1636f55aedf56..e4eba2c296b97be1917960a2c60418afb91b63ca 100644 (file)
@@ -34,7 +34,7 @@ import org.apache.poi.ss.formula.udf.DefaultUDFFinder;
 import org.apache.poi.ss.formula.udf.UDFFinder;
 import org.junit.jupiter.api.Test;
 
-public final class TestExternalFunction {
+final class TestExternalFunction {
 
        private static ValueEval myFunc1(ValueEval[] args, OperationEvaluationContext ec) {
                if (args.length != 1 || !(args[0] instanceof StringEval)) {
index fa6ce1b86ab8e036707868f29b9b24206225fd52..b82532592d8f8e766fcbf05c9b06ec41e3ec68e0 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
  * Miscellaneous tests for bugzilla entries.<p> The test name contains the
  * bugzilla bug id.
  */
-public final class TestFormulaBugs {
+final class TestFormulaBugs {
 
        /**
         * Bug 27349 - VLOOKUP with reference to another sheet.<p> This test was
index f1e21b42d7b9777332f8dee2ac63bf759c801c0a..90d9739efb54220f955338e5098f79feaa4097ce 100644 (file)
@@ -24,7 +24,7 @@ import org.apache.poi.hssf.HSSFITestDataProvider;
  *
  * @author Josh Micich
  */
-public final class TestHSSFCircularReferences extends BaseTestCircularReferences {
+final class TestHSSFCircularReferences extends BaseTestCircularReferences {
        public TestHSSFCircularReferences() {
         super(HSSFITestDataProvider.instance);
     }
index c239f1f933d8a5bff3f9afaeff495414ddd4fefb..f5a73d186dce58bfa064bfc77d96d22550c2e828 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
  * <li>Comparison operators have slightly different rules regarding '-0.0'.</li>
  * </ol>
  */
-public final class TestMinusZeroResult {
+final class TestMinusZeroResult {
        private static final double MINUS_ZERO = -0.0;
 
        @Test
index 4eeffce2bc7ca11bb85a19f8a8fd004c69846660..a89db5837f4c4a58a77d1186b2cf2ec2b6326864 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link MissingArgEval}
  */
-public final class TestMissingArgEval {
+final class TestMissingArgEval {
 
        @Test
        void testEvaluateMissingArgs() throws IOException {
index 88050c8bb6da3058087da062aa6bd5e7b5294b70..981a94fe69f8183b06f9f4b1190a771b84755cb6 100644 (file)
@@ -44,7 +44,7 @@ import org.junit.jupiter.params.provider.MethodSource;
 /**
  * Tests formulas for multi sheet reference (i.e. SUM(Sheet1:Sheet5!A1))
  */
-public final class TestMultiSheetEval {
+final class TestMultiSheetEval {
        /**
         * This class defines constants for navigating around the test data spreadsheet used for these tests.
         */
index dbf333cb1eadd54e8fb4977027e26752b35d913e..f37b81814294f04f08783009752890d249329270 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for <tt>OperandResolver</tt>
  */
-public final class TestOperandResolver {
+final class TestOperandResolver {
        @Test
        void testParseDouble_bug48472() {
                // bug 48472 - StringIndexOutOfBoundsException
index d03b1b4dfb98a92780e50db33b26e82312d7aa47..3727cc1c712289f9993ac43305ddb8e40372c3f7 100644 (file)
@@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test for percent operator evaluator.
  */
-public final class TestPercentEval {
+final class TestPercentEval {
 
        private static void confirm(ValueEval arg, double expectedResult) {
                ValueEval[] args = {
index 300be69851131a5746378b72ba48b8e4cb58f33c..78b0d49ac88230596464d59733309e6c0670c355 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for power operator evaluator.
  */
-public final class TestPowerEval {
+final class TestPowerEval {
     @Test
     void testPositiveValues() {
         confirm(0, 0, 1);
index 458e74df904441dfea00da888ed23bb909ca05d2..f67d8a92ffb17eef9a910a87c2e892a6622ea126 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test for unary plus operator evaluator.
  */
-public final class TestRangeEval {
+final class TestRangeEval {
        @Test
        void testPermutations() {
 
index d3c63547b9e231ca24a9599ef1b487a4db3a2018..febecbe359cd8ab04c9701035c4b4b153a43dc14 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test for unary plus operator evaluator.
  */
-public final class TestUnaryPlusEval {
+final class TestUnaryPlusEval {
 
        /**
         * Test for bug observable at svn revision 618865 (5-Feb-2008)<br>
index 84ad7d58fbbd94b5397495dfe269a68003e93c4d..29853a410d563b76c50999fed06db18e0e75b5ab 100644 (file)
@@ -22,7 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 import org.junit.jupiter.api.Test;
 
-public final class TestFunctionMetadataRegistry {
+final class TestFunctionMetadataRegistry {
        @Test
        void testWellKnownFunctions() {
                confirmFunction(0, "COUNT");
index d3837d57a971332b09550a0b4f13d8172584645b..c95eae8871a59b691cbdd035b9088a7c24e15731 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  * Tests parsing of some built-in functions that were not properly
  * registered in POI as of bug #44675, #44733 (March/April 2008).
  */
-public final class TestParseMissingBuiltInFuncs {
+final class TestParseMissingBuiltInFuncs {
 
        private static Ptg[] parse(String formula) throws IOException {
                HSSFWorkbook book = new HSSFWorkbook();
index 6dc380016090ba020601e684e514ecd8f990ad00..c26220dbd8e47bd2e5184ee6e33ba3c838ff610c 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
  * Tests reading from a sample spreadsheet some built-in functions that were not properly
  * registered in POI as of bug #44675, #44733 (March/April 2008).
  */
-public final class TestReadMissingBuiltInFuncs {
+final class TestReadMissingBuiltInFuncs {
 
        /**
         * This spreadsheet has examples of calls to the interesting built-in functions in cells A1:A7
index b9bf41f8547dce0a44ce02e41ae2420dcfc5293c..766ccc303ec72284f0a4ba5ecc7dfecf09738792 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.junit.jupiter.api.Test;
 
-public final class TestAddress {
+final class TestAddress {
 
     @Test
     void testAddress() {
index 8f9828e004d48c531e2b63e51790f90ad79d2514..3137614d3a7c2b46de3ed97ee371f34feebfa481 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.junit.jupiter.api.Test;
 
-public final class TestAreas {
+final class TestAreas {
 
     @Test
     void testAreas() {
index 5f1276421006e862d5882139b09e3e133c95d18d..bfee8f6ad66443a40ffc8bb4aeb6cfa4af441d7c 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for Excel function AVERAGE()
  */
-public final class TestAverage {
+final class TestAverage {
 
        private static ValueEval invokeAverage(ValueEval[] args) {
                return AggregateFunction.AVERAGE.evaluate(args, -1, (short)-1);
index 314d22a8a9996565dce748aa26e08266dc8712cb..e873ba227cee699d2cf981d83d2969016c4f7136 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public final class TestBin2Dec {
+final class TestBin2Dec {
 
     private static ValueEval invokeValue(String number1) {
                ValueEval[] args = new ValueEval[] { new StringEval(number1) };
index 96d4becd54842f995fe27435c983c4d542d8dd82..b59eb221a434bff5c6cc78b74bdd66b9bf934c67 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test for YEAR / MONTH / DAY / HOUR / MINUTE / SECOND
  */
-public final class TestCalendarFieldFunction {
+final class TestCalendarFieldFunction {
 
     private HSSFCell cell11;
     private HSSFFormulaEvaluator evaluator;
index 9a11fe69cc9ebd08d00e297457b335cc38d1a54e..1ab4f90ea00318fd336ae8debadcd13213e3ade2 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.junit.jupiter.api.Test;
 
-public final class TestClean {
+final class TestClean {
 
     @Test
     void testClean() {
index 174a71e24dd56461a73411e918c6923928f6184e..6b351fbe0d30bbbab104aab52e157ba75b5117b7 100644 (file)
@@ -46,7 +46,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test cases for COUNT(), COUNTA() COUNTIF(), COUNTBLANK()
  */
-public final class TestCountFuncs {
+final class TestCountFuncs {
 
        private static final String NULL = null;
 
index 390ba8b28633b1d3ff8fbf7d4ce5c4a168ebec6a..82d0e827425c6be2e4247e8e6c178fa9c8c30699 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * @author Pavel Krupets (pkrupets at palmtreebusiness dot com)
  */
-public final class TestDate {
+final class TestDate {
 
     private HSSFCell cell11;
     private HSSFFormulaEvaluator evaluator;
index 8a63924c4cf51af1ec5135512b559bb2ffef9671..fe487b68150ecb4a37a0ed5a1dc166646580a186 100644 (file)
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Milosz Rembisz
  */
-public final class TestDateValue {
+final class TestDateValue {
 
     @BeforeAll
     public static void init() {
index d994077853a9c7d23cc78ad09104ab2f5b8c55b1..b796a4d5b99fd4792747fbb96bf9c6c40f5e5ffc 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.poi.ss.usermodel.DateUtil;
 import org.apache.poi.util.LocaleUtil;
 import org.junit.jupiter.api.Test;
 
-public final class TestDays360 {
+final class TestDays360 {
 
     /**
      * @param month 1-based
index d3b481d95b1afd36a4d654131c2849e9ad015cd1..d745603a5ad5736dc3d65ae3d460215bfd69c7f6 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public final class TestDec2Bin {
+final class TestDec2Bin {
 
     private static ValueEval invokeValue(String number1) {
                ValueEval[] args = new ValueEval[] { new StringEval(number1) };
index 4548b9a4767a9d76802cdb16df652bf1ee9340ff..125f9c4396e7051dafafcafaebd0c745649f6fdd 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public final class TestDec2Hex {
+final class TestDec2Hex {
 
        private static ValueEval invokeValue(String number1, String number2) {
                ValueEval[] args = new ValueEval[] { new StringEval(number1), new StringEval(number2), };
index 0271ac36defcd00d3ffcc49a70602be8873c65ac..83aee557f3f32b39149e9a0cc577c867e6e736d1 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public final class TestDelta {
+final class TestDelta {
 
        private static ValueEval invokeValue(String number1, String number2) {
                ValueEval[] args = new ValueEval[] { new StringEval(number1), new StringEval(number2), };
index daa7130decb887c1e3d07c49068006d524c47711..31e50331d04662dd27887c4d89857638cacf7e75 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link Financed}
  */
-public final class TestFind {
+final class TestFind {
 
     @Test
        void testFind() throws IOException {
index 31ba9da1d7bf983df1319d28b5ca2301684a4d60..63f01cdbb6b08746e666a40c20ae9e0830239ea9 100644 (file)
@@ -37,7 +37,7 @@ import org.apache.poi.ss.usermodel.FormulaError;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-public final class TestFixed {
+final class TestFixed {
 
     private HSSFCell cell11;
     private HSSFFormulaEvaluator evaluator;
index 40190a27018544c67079baea164ebee5d0fa31ca..ba5bae0b1f4c8d0372c32e6db4e10af74b578c27 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public final class TestHex2Dec {
+final class TestHex2Dec {
 
     private static ValueEval invokeValue(String number1) {
                ValueEval[] args = new ValueEval[] { new StringEval(number1) };
index 309bacfd57d6e78bfd1e2ff1e7e6dafe9f9fab15..e11a2b87c1eb808aa5fe364295558c03c7d1975c 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  * Test cases for IPMT()
  *
  */
-public final class TestIPMT {
+final class TestIPMT {
 
 
     /**
index 5e71f608a8073bb2da0b9620b6ba96b139dff7be..b39e396c04f6240627fc53ba06d1144328d137b0 100644 (file)
@@ -45,7 +45,7 @@ import org.junit.jupiter.api.Test;
  * Another test: {@link TestIndexFunctionFromSpreadsheet} operates from a higher level
  * and has far greater coverage of input permutations.<br>
  */
-public final class TestIndex {
+final class TestIndex {
 
        private static final Index FUNC_INST = new Index();
        private static final double[] TEST_VALUES0 = {
index c477104ffb7c8d357474c2559c8643040cc32b41..8bf6ffc1a98c5ea36a7af003136027341a762d57 100644 (file)
@@ -24,7 +24,7 @@ import org.junit.jupiter.params.provider.Arguments;
 /**
  * Tests INDEX() as loaded from a test data spreadsheet.<p>
  */
-public final class TestIndexFunctionFromSpreadsheet  extends BaseTestFunctionsFromSpreadsheet {
+final class TestIndexFunctionFromSpreadsheet  extends BaseTestFunctionsFromSpreadsheet {
     public static Stream<Arguments> data() throws Exception {
         return data(TestIndexFunctionFromSpreadsheet.class, "IndexFunctionTestCaseData.xls");
     }
index 341e4ad6a18595d8c2e3262eccab63a849df6153..45422e19e767b4cf3f75b9a2a3a574097bfaff97 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for the INDIRECT() function.</p>
  */
-public final class TestIndirect {
+final class TestIndirect {
     // convenient access to namespace
     // private static final ErrorEval EE = null;
 
index 8f7f15fffb89b424409227f26873b73a034b2753..f3a8cccb4f5cc66742bdb8bda32aeac575071818 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.params.provider.Arguments;
  * (<tt>TestXxxx</tt>) of the target (<tt>Xxxx</tt>) implementor, where execution can be observed
  *  more easily.
  */
-public final class TestIndirectFunctionFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
+final class TestIndirectFunctionFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
     public static Stream<Arguments> data() throws Exception {
         return data(TestIndirectFunctionFromSpreadsheet.class, "IndirectFunctionTestCaseData.xls");
     }
index b1453c4677b92a00ae2ef9394119c0beaf4680a4..03dac3cef256f52b2a3f49558f7e71e915c82d8c 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Johan Karlsteen
  */
-public final class TestIntercept {
+final class TestIntercept {
        private static final Function INTERCEPT = new Intercept();
 
        private static ValueEval invoke(Function function, ValueEval xArray, ValueEval yArray) {
index 73b9e7513226406572d06241383cf2b4539bc235..6764ebdc2bed68b092cd798a121027a2d00ae655 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link Irr}
  */
-public final class TestIrr {
+final class TestIrr {
 
     @Test
     void testIrr() {
index 749139d240e08d196de372d857ca594aacb73065..9f6ece060c5bb4ab8bc2be7e42bf831de9ce00c9 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestIsBlank {
+final class TestIsBlank {
 
     @Test
     void test3DArea() {
index 5283b969ac3d878d6979c48a3551d61c3c2d742e..b4d8aa7a13a93e69d5a5fc81325e21b241f82393 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestLen {
+final class TestLen {
 
        private static ValueEval invokeLen(ValueEval text) {
                ValueEval[] args = new ValueEval[] { text, };
index ad0a60ec9ba382cf6f8f5beede58cd500d7372ce..84d3674b70461c637bd2b40524922403cd360a5a 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.params.provider.Arguments;
  * (<tt>TestXxxx</tt>) of the target (<tt>Xxxx</tt>) implementor, where execution can be observed
  *  more easily.
  */
-public final class TestLookupFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
+final class TestLookupFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
     public static Stream<Arguments> data() throws Exception {
         return data(TestLookupFunctionsFromSpreadsheet.class, "LookupFunctionsTestCaseData.xls");
     }
index fd434fb23c1368ddfce2022a2c29092364c583ac..3721c688dfef5abd4fd2e1d3337e8a01801420f1 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test cases for MATCH()
  */
-public final class TestMatch {
+final class TestMatch {
        /** less than or equal to */
        private static final NumberEval MATCH_LARGEST_LTE = new NumberEval(1);
        private static final NumberEval MATCH_EXACT = new NumberEval(0);
index ef7ee77195151ef043e7fb534177d691d46e6f6d..7f6f8ca2e6eeae208aa23d871c0d7a70bd7bcb5e 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.params.provider.Arguments;
  * (<tt>TestXxxx</tt>) of the target (<tt>Xxxx</tt>) implementor, where execution can be observed
  *  more easily.
  */
-public final class TestMatchFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
+final class TestMatchFunctionsFromSpreadsheet extends BaseTestFunctionsFromSpreadsheet {
     public static Stream<Arguments> data() throws Exception {
         return data(TestMatchFunctionsFromSpreadsheet.class, "MatchFunctionTestCaseData.xls");
     }
index 7046329998db6bdf4c4880195b42646364eeb6c0..866c65fb4a4c15410e736af560554c6c5ab3d089 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestMid {
+final class TestMid {
 
 
        private static ValueEval invokeMid(ValueEval text, ValueEval startPos, ValueEval numChars) {
index db7bc7f17d6788d78820340a845a05a90506d1f5..f640cb54eed8990f38c857bed68b2dd36307493f 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test;
  * @author Cedric Walter (cedric dot walter at gmail dot com)
  * @see org.apache.poi.ss.formula.functions.TestIrr
  */
-public final class TestMirr {
+final class TestMirr {
 
     @Test
     void testMirr() throws EvaluationException {
index 9ced557280b20a9f605b3ec6d28f591234ed4e29..9f958f02058d757cef59d5236d8bfd993dccd400 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link FinanceFunction#NPER}
  */
-public final class TestNper {
+final class TestNper {
 
     @Test
        void testSimpleEvaluate() {
index 35d91b732bf390a171e1d6a3c5eee5ab7d8013f8..191ff37fef0c4ff8d110c60b06a9badd846a0d88 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
  *
  * @see <a href="http://office.microsoft.com/en-us/excel-help/npv-HP005209199.aspx">Excel Help</a>
  */
-public final class TestNpv {
+final class TestNpv {
 
     @Test
     void testEvaluateInSheetExample2() {
index a714044d92b6f508ed82561a9b2023d992b10b4c..89c19277d2824c8017f4910fddc57127d251d84d 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author cedric dot walter @ gmail dot com
  */
-public final class TestOct2Dec {
+final class TestOct2Dec {
 
     private static ValueEval invokeValue(String number1) {
                ValueEval[] args = new ValueEval[] { new StringEval(number1) };
index deaafbbd20de66ec393bc9337ff40bbd1ce63c6c..fd2ada7b97d88dc5392ec366e84b7e3b2d4ae209 100644 (file)
@@ -39,7 +39,7 @@ import org.junit.jupiter.params.provider.CsvSource;
  *
  * @author Josh Micich
  */
-public final class TestOffset {
+final class TestOffset {
 
        /**
         * Excel's double to int conversion (for function 'OFFSET()') behaves more like Math.floor().
index f928a1dcd8d3a815092fb725fbcf609211c7d23a..0b908063fc133377277d1a1ae6134529646883d6 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  * Test cases for PPMT()
  *
  */
-public final class TestPPMT {
+final class TestPPMT {
 
 
     /**
index b2b8bab3669231af3b6f4f9c1d692243a7e92546..0640450a03d3e56de681cd1dacbd5d003d7a1d69 100644 (file)
@@ -20,7 +20,6 @@ package org.apache.poi.ss.formula.functions;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import org.apache.poi.ss.formula.eval.ErrorEval;
 import org.apache.poi.ss.formula.eval.NumberEval;
@@ -28,7 +27,7 @@ import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.usermodel.FormulaError;
 import org.junit.jupiter.api.Test;
 
-public final class TestPmt {
+final class TestPmt {
 
        private static void confirm(double expected, NumberEval ne) {
                // only asserting accuracy to 4 fractional digits
index a6b8e650e0defe59150201866577b97e7a2c7f76..90da6fdb0af73e467c8e0a2c579c85f244feed2b 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test cases for RANK()
  */
-public final class TestRank {
+final class TestRank {
 
     @Test
     void testFromFile() {
index 3a73915f71dddfa5a4b9dd7ac4707a3ef3c8a087..4450528822eac99bf5c3139bb7cd10968929234a 100644 (file)
@@ -19,20 +19,19 @@ package org.apache.poi.ss.formula.functions;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import org.junit.jupiter.api.Disabled;
-import org.junit.jupiter.api.Test;
-
 import org.apache.poi.ss.formula.eval.ErrorEval;
-import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.formula.eval.NumberEval;
 import org.apache.poi.ss.formula.eval.StringEval;
+import org.apache.poi.ss.formula.eval.ValueEval;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test cases for ROUND(), ROUNDUP(), ROUNDDOWN()
  *
  * @author Josh Micich
  */
-public final class TestRoundFuncs {
+final class TestRoundFuncs {
        // github-43
        // https://github.com/apache/poi/pull/43
     @Disabled("ROUNDUP(3987*0.2, 2) currently fails by returning 797.41")
index efdb2dad87ad051166068f07405cbb58fdeca409..eb2812e0e431bb4e476880e6f97dd974762fb9b2 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestRowCol {
+final class TestRowCol {
 
        @Test
        void testCol() {
index 76bc55d0a3878e227641ba40b5ec3df75c9e1c57..5c8bc1eb33be8d2074246a4edcf5c6d3896e7199 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Johan Karlsteen
  */
-public final class TestSlope {
+final class TestSlope {
        private static final Function SLOPE = new Slope();
 
        private static ValueEval invoke(Function function, ValueEval xArray, ValueEval yArray) {
index f42e21c68da29d115419559515dfe6ab3a3eab70..3f4eb88dd8154ce38023dd2b480e9b6b2b4e3b05 100644 (file)
@@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link Subtotal}
  */
-public final class TestSubtotal {
+final class TestSubtotal {
        private static final int FUNCTION_AVERAGE = 1;
        private static final int FUNCTION_COUNT = 2;
        private static final int FUNCTION_MAX = 4;
index 582e330e22cfbcb8eab55efed7251fd0fc0a690c..4bd60295a84e809d28c502eb3504391128afa98e 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test cases for SUMPRODUCT()
  */
-public final class TestSumif {
+final class TestSumif {
        private static final NumberEval _30 = new NumberEval(30);
        private static final NumberEval _40 = new NumberEval(40);
        private static final NumberEval _50 = new NumberEval(50);
index 217087287463fb219fb94c4db89b7fb569eb92bf..6aa19629539635fe1506f6c89486596c5cb1472a 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test cases for SUMIFS()
  */
-public final class TestSumifs {
+final class TestSumifs {
 
     private static final OperationEvaluationContext EC = new OperationEvaluationContext(null, null, 0, 1, 0, null);
 
index 17384986e187a3f8c7b62e7c85f8fbc15599ca7b..35ee48d26c7577d1cb5dc1fd12090f2df00d785f 100644 (file)
@@ -19,7 +19,6 @@ package org.apache.poi.ss.formula.functions;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import org.apache.poi.ss.formula.eval.AreaEval;
 import org.apache.poi.ss.formula.eval.ErrorEval;
@@ -34,7 +33,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestSumproduct {
+final class TestSumproduct {
 
        private static ValueEval invokeSumproduct(ValueEval[] args) {
                // srcCellRow and srcCellColumn are ignored by SUMPRODUCT
index a6fd25a68efc1efc9c88c151bdc6abae21be3646..03cb480e47e818508bdd4b294128d1b7a024187b 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestTFunc {
+final class TestTFunc {
 
        /**
         * @return the result of calling function T() with the specified argument
index acf2fae2f5d71529b78570eaa47613813a864735..ddcdd35165f3f3a432689bc02c006e077b1c7cbd 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test case for TEXT()
  */
-public final class TestText {
+final class TestText {
     @Test
     void testTextWithStringFirstArg() {
         ValueEval strArg = new StringEval("abc");
index 24c4deed1eb89e88533b4df4728affd9de3ba064..d45787b2a5b16e697f1ea4d6b54e37028694ae04 100644 (file)
@@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link TimeFunc}
  */
-public final class TestTime {
+final class TestTime {
 
        private static final int SECONDS_PER_MINUTE = 60;
        private static final int SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE;
index edc39f7706f77f65e5ba1b3ca2927650ae47b371..efee41b996172e63c21927169b6c7bf21980e69e 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestTrim {
+final class TestTrim {
 
 
        private static ValueEval invokeTrim(ValueEval text) {
index da6c969a9375fcfa59ad3d84f54a640ecf2d178d..6e1d5d8cac54c04fd6f89d4747aee9e91bd613ce 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Stephen Wolke (smwolke at geistig.com)
  */
-public final class TestTrunc extends BaseTestNumeric {
+final class TestTrunc extends BaseTestNumeric {
     private static final NumericFunction F = null;
 
     @Test
index cf65c42817e2df20320aef568640b536b8493fe4..a733f243de08256553c77ce9f35977e840629451 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link Value}
  */
-public final class TestValue {
+final class TestValue {
 
        private static ValueEval invokeValue(String strText) {
                ValueEval[] args = new ValueEval[] { new StringEval(strText), };
index 077061c316c552bc4772bdca9dd57ce7dc6f3067..b97e80171e57fcfe8afe65ee67d481bb04842d8d 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Josh Micich
  */
-public final class TestXYNumericFunction {
+final class TestXYNumericFunction {
        private static final Function SUM_SQUARES = new Sumx2py2();
        private static final Function DIFF_SQUARES = new Sumx2my2();
        private static final Function SUM_SQUARES_OF_DIFFS = new Sumxmy2();
index 6a5c1af504da8c853f36ec1a22d2f3cc0bd2e7d6..51b8c32f28a8d5f5a1d38aa1102dd6819a8b4565 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for Area3DPtg
  */
-public final class TestArea3DPtg extends BaseTestPtg {
+final class TestArea3DPtg extends BaseTestPtg {
 
        /**
         * confirms that sheet names get properly escaped
index 70b73f0c7875cfb8a185d3f352a396eb03bfa62f..91e76c08ef6302d9377e62a7bd78123db5f6c872 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link AreaErrPtg}.
  */
-public final class TestAreaErrPtg extends BaseTestPtg {
+final class TestAreaErrPtg extends BaseTestPtg {
     /**
      * Tests reading a file containing this ptg.
      */
index 71789d3c94295d9d26a83f5440e62c1280270403..ea5a2cee5094f5f7997dd903a5b0401a96e2be60 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link AreaPtg}.
  */
-public final class TestAreaPtg {
+final class TestAreaPtg {
 
        AreaPtg relative;
        AreaPtg absolute;
index 6f8c09ad08d5ae8c50dbb1cef54b93893bf4b6b7..c5a1b44bd07227bec1359f793aaab1de0850903a 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for <tt>ArrayPtg</tt>
  */
-public final class TestArrayPtg {
+final class TestArrayPtg {
 
        private static final byte[] ENCODED_PTG_DATA = {
                0x40,
index e09463ef1030a7e61df3e1728e0596ca691d6bb7..142f4a574f612e403145cab48a5d555e2d1899b7 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link AttrPtg}.
  */
-public final class TestAttrPtg extends BaseTestPtg {
+final class TestAttrPtg extends BaseTestPtg {
 
        /**
         * Fix for bug visible around svn r706772.
index 4b5a4b8c19034d1d6c0a5c947d7e46bcf06da361..bddba7ff54695f6add8b54c0629f218c1febde99 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link ErrPtg}.
  */
-public final class TestErrPtg extends BaseTestPtg {
+final class TestErrPtg extends BaseTestPtg {
     /**
      * Tests reading a file containing this ptg.
      */
index bdc92a70a98d63fdefa0a4f46337c0e0b3bca99b..fedc63976408d7624d93bc31bb974fc6e627a89f 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for functions from external workbooks (e.g. YEARFRAC).
  */
-public final class TestExternalFunctionFormulas {
+final class TestExternalFunctionFormulas {
 
        /**
         * tests <tt>NameXPtg.toFormulaString(Workbook)</tt> and logic in Workbook below that
index 7e3a9a44f8113c6e91befdcb4d45507daf779ba6..0c582c5cf75302e77cc98abe0920a0c092f4ba9b 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for proper calculation of named ranges from external workbooks.
  */
-public final class TestExternalNameReference {
+final class TestExternalNameReference {
        double MARKUP_COST_1 = 1.8d;
        double MARKUP_COST_2 = 1.5d;
        double PART_COST = 12.3d;
index dd91bff392ba90d7438d2811a557fbae4dfbf6f4..fd6027fa939c3e50e9893baf79437e0fef9ec85e 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Make sure the FuncPtg performs as expected
  */
-public final class TestFuncPtg {
+final class TestFuncPtg {
 
     @Test
     void testRead() {
index 83c13ce1a167f4ab602979f58c93fc6e01e284c1..2eb91217cb9264b9074ae57f8805044012d12752 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 /**
  * @author Josh Micich
  */
-public final class TestFuncVarPtg {
+final class TestFuncVarPtg {
 
        /**
         * The first fix for bugzilla 44675 broke the encoding of SUM formulas (and probably others).
index ac6ad197b688e89667c7f0437d2e04dba3d60d7a..91ed33b1e99404158bd639ca3d894f905eb79278 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link IntersectionPtg}.
  */
-public final class TestIntersectionPtg extends BaseTestPtg {
+final class TestIntersectionPtg extends BaseTestPtg {
     /**
      * Tests reading a file containing this ptg.
      */
index 309db5bac7857c609504314cacb744abccc33ba7..7a806f15cd18b4ef519ca8999d3335467fc7c7a7 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link PercentPtg}.
  */
-public final class TestPercentPtg extends BaseTestPtg {
+final class TestPercentPtg extends BaseTestPtg {
     /**
      * Tests reading a file containing this ptg.
      */
index 189af759b20fe764b08102032ac2f02ca13548af..6ff906c96c6268b90eab0a786248e375c84d07df 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link RangePtg}.
  */
-public final class TestRangePtg extends BaseTestPtg {
+final class TestRangePtg extends BaseTestPtg {
     /**
      * Tests reading a file containing this ptg.
      */
index 965428340a2ebaaac229aeb7ce6ef44c900493bc..2a1b44e6fc36b86ed5db7df838813e5eb739b185 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for Ref3DPtg
  */
-public final class TestRef3DPtg extends BaseTestPtg {
+final class TestRef3DPtg extends BaseTestPtg {
        @Test
        void testToFormulaString() throws IOException {
 
index af571ecddd11a01e47d5a8847c91865c5add510e..cc67d4304ae29c9b60c501b283b6e89daf8713bc 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link RefPtg}.
  */
-public final class TestReferencePtg {
+final class TestReferencePtg {
     /**
      * Tests reading a file containing this ptg.
      */
index bde83c06b3fa22c6507fff36a6c60d2850376070..7b85995a02a45ec2f558eb2a19ddc91393f857f2 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link UnionPtg}.
  */
-public final class TestUnionPtg extends BaseTestPtg {
+final class TestUnionPtg extends BaseTestPtg {
     /**
      * Tests reading a file containing this ptg.
      */
index f68c1143bb5a1ede37817501e68e278180ca7b6d..7a45018569d1e535d68aec3b4e94e9d323d551d9 100644 (file)
@@ -35,7 +35,7 @@ import org.junit.jupiter.api.Test;
  * Tests for the Fraction Formatting part of DataFormatter.
  * Largely taken from bug #54686
  */
-public final class TestFractionFormat {
+final class TestFractionFormat {
     @Test
     void testSingle() {
         FractionFormat f = new FractionFormat("", "##");
index 721464573f29f44e589cf03846874f89ef9b21d7..202ffae308d4580ab6bd119086a36714d1334034 100644 (file)
@@ -22,7 +22,7 @@ import org.apache.poi.hssf.HSSFITestDataProvider;
 /**
  * @author Yegor Kozlov
  */
-public final class TestHSSFBorderStyle extends BaseTestBorderStyle  {
+final class TestHSSFBorderStyle extends BaseTestBorderStyle  {
 
     public TestHSSFBorderStyle() {
         super(HSSFITestDataProvider.instance);
index 40889cae75e4b8abe75b3b8746ac03ce65aa859f..d336ea95cdab145e44d80f79b90fbc888eb6afe5 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
 /**
  * @author Yegor Kozlov
  */
-public final class TestIndexedColors {
+final class TestIndexedColors {
 
     @Test
     void fromInt() {
index fa67df58fce3b24775ce7b439487e6d02a6d4914..044203f3c2c3cca2d93b7134c79a7d4fb391fe31 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests that the common CellAddress works as we need it to.
  */
-public final class TestCellAddress {
+final class TestCellAddress {
     @Test
     void testConstructors() {
         CellAddress cellAddress;
index 46c8363895bbf1af18043756610bed7ab0182c0f..01d12f41c3272d6d1e3003e60a49aeb97fcc8120 100644 (file)
@@ -34,7 +34,7 @@ import org.apache.poi.hssf.record.TestcaseRecordInputStream;
 import org.apache.poi.util.LittleEndianOutputStream;
 import org.junit.jupiter.api.Test;
 
-public final class TestCellRangeAddress {
+final class TestCellRangeAddress {
     static final byte[] data = new byte[] {
             0x02, 0x00, 0x04, 0x00,
             0x00, 0x00, 0x03, 0x00,
index 9d6c42cc64f525d811d29a0c8e6e7d7b6c2d07ba..5b402a3bcd59d75e9fc48665c9c0fc671e380e45 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
  *
  * @see org.apache.poi.ss.util.CellRangeUtil
  */
-public final class TestCellRangeUtil {
+final class TestCellRangeUtil {
 
     private static final CellRangeAddress A1 = new CellRangeAddress(0, 0, 0, 0);
     private static final CellRangeAddress B1 = new CellRangeAddress(0, 0, 1, 1);
index d174d64235d400bbf2fc2d5f61ac8f1a4bae9abb..0d2d7913744e1ddae46bee8ed542724a0df05504 100644 (file)
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test;
  * Note - some additional testing is also done in the HSSF class,
  *  {@link org.apache.poi.hssf.util.TestCellReference}
  */
-public final class TestCellReference {
+final class TestCellReference {
     @Test
     void testConstructors() {
         CellReference cellReference;
index fb5e1169e240241625276b2f71e55d43112ea51e..3113bc95e9f9062bf47b4b40a5f7cc5f1854932f 100644 (file)
@@ -48,7 +48,7 @@ import org.apache.poi.util.LocaleID;
 import org.apache.poi.util.TempFile;
 import org.junit.jupiter.api.Test;
 
-public final class TestDateFormatConverter {
+final class TestDateFormatConverter {
     private void outputLocaleDataFormats( Date date, boolean dates, boolean times, int style, String styleName ) throws Exception {
         try (Workbook workbook = new HSSFWorkbook()) {
             String sheetName;
index 937b53a036e7b46abd141cef4d7ed6da69e2cdf0..30f84a3eb75eb4a2f7e96f2db97a3d14a27ea87a 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link ExpandedDouble}
  */
-public final class TestExpandedDouble {
+final class TestExpandedDouble {
        private static final BigInteger BIG_POW_10 = BigInteger.valueOf(1000000000);
 
        @Test
index d5f95cf4077df2acaf1b338e254d0af99f4e4029..42a0edd841a95eba91442457559adaec5604a72f 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link NumberComparer}
  */
-public final class TestNumberComparer {
+final class TestNumberComparer {
 
     @Test
        void testAllComparisonExamples() {
index 0cf5d6f818cd75196d4be0068f1e2197af2f1f90..387980d8709cd867d28c0a99975dbbc76503673c 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Tests for {@link NumberToTextConverter}
  */
-public final class TestNumberToTextConverter {
+final class TestNumberToTextConverter {
        /**
         * Confirms that <tt>ExcelNumberToTextConverter.toText(d)</tt> produces the right results.
         * As part of preparing this test class, the <tt>ExampleConversion</tt> instances should be set
index 603bbb0d599b501d0ccaf83d2c65215317cf7775..bd577357062014153548ceeec97d39985d9db55b 100644 (file)
@@ -38,7 +38,7 @@ import org.junit.jupiter.api.Test;
  *
  * @see org.apache.poi.ss.util.PropertyTemplate
  */
-public final class TestPropertyTemplate {
+final class TestPropertyTemplate {
     @Test
     void getNumBorders() throws IOException {
         CellRangeAddress a1 = new CellRangeAddress(0, 0, 0, 0);
index afa0ec0dfcb8efb7b8d7563c737eb0506f377f05..1fcd52ca802661e0979d799393e8c609402e04c3 100644 (file)
@@ -17,7 +17,9 @@
 
 package org.apache.poi.ss.util;
 
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
 
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.BorderStyle;
@@ -31,12 +33,10 @@ import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
-import java.io.IOException;
-
 /**
  * Tests that the common RegionUtil works as we need it to.
  */
-public final class TestRegionUtil {
+final class TestRegionUtil {
     private static final CellRangeAddress A1C3 = new CellRangeAddress(0, 2, 0, 2);
     private static final BorderStyle NONE = BorderStyle.NONE;
     private static final BorderStyle THIN = BorderStyle.THIN;
index 895766c7b31db247157fecdd545252b02add7988..e258895c8fbd6c9d023215ed40c4c5fd798a035a 100644 (file)
@@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
  *
  * @see org.apache.poi.ss.util.SheetBuilder
  */
-public final class TestSheetBuilder {
+final class TestSheetBuilder {
 
     private static Object[][] testData = new Object[][]{
             {1, 2, 3},
index 709b6deb9b73e4672d6fc5021b0dfdf687b2605e..c61ba564012391c2aa18e04ebfb4371025751437 100644 (file)
 
 package org.apache.poi.ss.util;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.io.IOException;
+
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -24,19 +31,12 @@ import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.junit.jupiter.api.Test;
 
-import java.io.IOException;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
 /**
  * Tests SheetUtil.
  *
  * @see org.apache.poi.ss.util.SheetUtil
  */
-public final class TestSheetUtil {
+final class TestSheetUtil {
     @Test
     void testCellWithMerges() throws Exception {
         try (Workbook wb = new HSSFWorkbook()) {
index 3725c639406c6a082a5d0a00b2a4304220b48a2a..bb4094a470dff99036f8f31908303750538520c9 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
  *
  * @see org.apache.poi.ss.util.WorkbookUtil
  */
-public final class TestWorkbookUtil {
+final class TestWorkbookUtil {
        /**
         * borrowed test cases from
         * {@link org.apache.poi.hssf.record.TestBoundSheetRecord#testValidNames()}
index 2834466979d81b4e244639dfe5ccc6e5f20c2a5f..55c30087fadae76b7303d3c392d87de06ea4372a 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test BitField functionality
  */
-public final class TestBitField {
+final class TestBitField {
     private static BitField bf_multi  = BitFieldFactory.getInstance(0x3F80);
     private static BitField bf_single = BitFieldFactory.getInstance(0x4000);
 
index 782a87b03284e53383cd74dedc422f7f3036d932..8c37667fbc73380b43a436cdb802de3d1140c883 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Unit test for ByteField class
  */
-public final class TestByteField {
+final class TestByteField {
 
     private static final byte[] _test_array = {
         Byte.MIN_VALUE, ( byte ) -1, ( byte ) 0, ( byte ) 1, Byte.MAX_VALUE
index a4a3513ba521dff36cabeb6e42d7574079270b71..196fcf401b9a940e73eb38ed17ae98567aa95a5a 100644 (file)
@@ -45,7 +45,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test IOUtils
  */
-public final class TestIOUtils {
+final class TestIOUtils {
 
     private static File TMP;
     private static final long LENGTH = 300+new Random().nextInt(9000);
index 38e8cc2cc3df471db934b8ec9a72cbb5e59c7cfd..3483933ce45726fd65658feeef10fb211f2cec43 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
  *
  * @author Marc Johnson
  */
-public final class TestIntList {
+final class TestIntList {
     @Test
     void testConstructors() {
         IntList list = new IntList();
index 96740ce464861c4175ab477c706aef4799b5b837..d8e2f1b66fb6b5ad772bd74335fee9989fc9bd63 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test IntegerField code
  */
-public final class TestIntegerField {
+final class TestIntegerField {
 
     private static final int[] _test_array = {Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE};
 
index 268dba5621ba1e8b2215893df4d80f9a8cf3688f..27e5e3fe1a416d7147b5b0d5db5e92bd3ca7eeb6 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test LittleEndian functionality
  */
-public final class TestLittleEndian {
+final class TestLittleEndian {
 
     /**
      * test the getShort() method
index dfeff3cc04a138cddfab3ffafe897c30bc7a3329..54ebefa5b53ad31da71e08a01609749789b7e02e 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Class to test {@link LittleEndianInputStream} and {@link LittleEndianOutputStream}
  */
-public final class TestLittleEndianStreams {
+final class TestLittleEndianStreams {
 
        @Test
        void testRead() throws IOException {
index 164c6ceb01c583d148d9deaf70a3ca5856727fb1..8cd39aba92734060b13e9c7995473f5e82ac224b 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test LongField code
  */
-public final class TestLongField {
+final class TestLongField {
 
     static private final long[] _test_array =
     {
index 9fa8fe8271b4ca74ac3a8c0a0449e87b7598e2c4..05553887d6166b7fa91c407b2a34aac96e9903a6 100644 (file)
@@ -19,7 +19,7 @@ package org.apache.poi.util;
 
 import org.junit.jupiter.api.Test;
 
-public final class TestPOILogFactory {
+final class TestPOILogFactory {
 
 
     /**
index 73f22250ca685ed1f912d57c30a52b5d3f51a833..8c863ee074020df91b93b0c9ba8d5422fccd77b9 100644 (file)
@@ -19,7 +19,6 @@ package org.apache.poi.util;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.fail;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -29,7 +28,7 @@ import org.junit.jupiter.api.Test;
 /**
  * Test ShortField code
  */
-public final class TestShortField {
+final class TestShortField {
 
     private static final short[] _test_array = {Short.MIN_VALUE, -1, 0, 1, Short.MAX_VALUE};