You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2021/01/09 18:24:52 UTC
svn commit: r1885308 [4/4] - in /poi/trunk/src:
ooxml/testcases/org/apache/poi/xssf/streaming/
ooxml/testcases/org/apache/poi/xssf/usermodel/ testcases/org/apache/poi/
testcases/org/apache/poi/ddf/ testcases/org/apache/poi/hpsf/
testcases/org/apache/po...
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java Sat Jan 9 18:24:51 2021
@@ -63,7 +63,7 @@ public abstract class BaseTestSheetAutos
}
@Test
- public void numericCells() throws Exception {
+ void numericCells() throws Exception {
Workbook workbook = _testDataProvider.createWorkbook();
DataFormat df = workbook.getCreationHelper().createDataFormat();
Sheet sheet = workbook.createSheet();
@@ -105,7 +105,7 @@ public abstract class BaseTestSheetAutos
}
@Test
- public void booleanCells() throws Exception {
+ void booleanCells() throws Exception {
Workbook workbook = _testDataProvider.createWorkbook();
Sheet sheet = workbook.createSheet();
trackColumnsForAutoSizingIfSXSSF(sheet);
@@ -136,7 +136,7 @@ public abstract class BaseTestSheetAutos
}
@Test
- public void dateCells() throws Exception {
+ void dateCells() throws Exception {
Workbook workbook = _testDataProvider.createWorkbook();
Sheet sheet = workbook.createSheet();
trackColumnsForAutoSizingIfSXSSF(sheet);
@@ -203,7 +203,7 @@ public abstract class BaseTestSheetAutos
}
@Test
- public void stringCells() throws Exception {
+ void stringCells() throws Exception {
Workbook workbook = _testDataProvider.createWorkbook();
Sheet sheet = workbook.createSheet();
trackColumnsForAutoSizingIfSXSSF(sheet);
@@ -237,7 +237,7 @@ public abstract class BaseTestSheetAutos
}
@Test
- public void rotatedText() throws Exception {
+ void rotatedText() throws Exception {
Workbook workbook = _testDataProvider.createWorkbook();
Sheet sheet = workbook.createSheet();
trackColumnsForAutoSizingIfSXSSF(sheet);
@@ -264,7 +264,7 @@ public abstract class BaseTestSheetAutos
}
@Test
- public void mergedCells() throws Exception {
+ void mergedCells() throws Exception {
Workbook workbook = _testDataProvider.createWorkbook();
Sheet sheet = workbook.createSheet();
trackColumnsForAutoSizingIfSXSSF(sheet);
@@ -291,7 +291,7 @@ public abstract class BaseTestSheetAutos
* passed the 32767 boundary. See bug #48079
*/
@Test
- public void largeRowNumbers() throws Exception {
+ void largeRowNumbers() throws Exception {
Workbook workbook = _testDataProvider.createWorkbook();
Sheet sheet = workbook.createSheet();
trackColumnsForAutoSizingIfSXSSF(sheet);
@@ -346,7 +346,7 @@ public abstract class BaseTestSheetAutos
@Test
- public void testExcelExporter() throws IOException {
+ void testExcelExporter() throws IOException {
try (final Workbook wb = _testDataProvider.createWorkbook()) {
final Sheet sheet = wb.createSheet("test");
trackColumnsForAutoSizingIfSXSSF(sheet);
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetHiding.java Sat Jan 9 18:24:51 2021
@@ -48,13 +48,13 @@ public abstract class BaseTestSheetHidin
}
@BeforeEach
- public void setUp() {
+ void setUp() {
wbH = _testDataProvider.openSampleWorkbook(_file1);
wbU = _testDataProvider.openSampleWorkbook(_file2);
}
@AfterEach
- public void teadDown() throws IOException {
+ void teadDown() throws IOException {
wbH.close();
wbU.close();
}
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftColumns.java Sat Jan 9 18:24:51 2021
@@ -43,7 +43,7 @@ public abstract class BaseTestSheetShift
protected ITestDataProvider _testDataProvider;
@BeforeEach
- public void init() {
+ void init() {
int rowIndex = 0;
sheet1 = workbook.createSheet("sheet1");
Row row = sheet1.createRow(rowIndex++);
@@ -257,7 +257,7 @@ public abstract class BaseTestSheetShift
}
@Test
- public void shiftMergedColumnsToMergedColumnsRight() throws IOException {
+ protected void shiftMergedColumnsToMergedColumnsRight() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet("test");
@@ -279,7 +279,7 @@ public abstract class BaseTestSheetShift
}
@Test
- public void shiftMergedColumnsToMergedColumnsLeft() throws IOException {
+ protected void shiftMergedColumnsToMergedColumnsLeft() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet("test");
populateSheetCells(sheet);
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java Sat Jan 9 18:24:51 2021
@@ -599,7 +599,7 @@ public abstract class BaseTestSheetShift
//@Disabled("bug 56454: Incorrectly handles merged regions that do not contain column 0")
@Test
- public void shiftRowsWithMergedRegionsThatDoNotContainColumnZero() throws IOException {
+ void shiftRowsWithMergedRegionsThatDoNotContainColumnZero() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet("test");
@@ -638,7 +638,7 @@ public abstract class BaseTestSheetShift
}
@Test
- public void shiftMergedRowsToMergedRowsUp() throws IOException {
+ void shiftMergedRowsToMergedRowsUp() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet("test");
populateSheetCells(sheet, 2);
@@ -661,7 +661,7 @@ public abstract class BaseTestSheetShift
}
@Test
- public void shiftMergedRowsToMergedRowsOverlappingMergedRegion() throws IOException {
+ void shiftMergedRowsToMergedRowsOverlappingMergedRegion() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet("test");
populateSheetCells(sheet, 10);
@@ -683,7 +683,7 @@ public abstract class BaseTestSheetShift
}
@Test
- public void bug60384ShiftMergedRegion() throws IOException {
+ void bug60384ShiftMergedRegion() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet("test");
populateSheetCells(sheet, 9);
@@ -718,7 +718,7 @@ public abstract class BaseTestSheetShift
}
@Test
- public void shiftMergedRowsToMergedRowsDown() throws IOException {
+ void shiftMergedRowsToMergedRowsDown() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet("test");
@@ -765,7 +765,7 @@ public abstract class BaseTestSheetShift
@Test
- public void checkMergedRegions56454() {
+ void checkMergedRegions56454() {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sheet = wb.createSheet();
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java Sat Jan 9 18:24:51 2021
@@ -517,7 +517,7 @@ public abstract class BaseTestSheetUpdat
@Disabled("See bug 59728")
@Test
- public void shouldNotBeAbleToCreateArrayFormulaOnPreexistingMergedRegion() throws IOException {
+ void shouldNotBeAbleToCreateArrayFormulaOnPreexistingMergedRegion() throws IOException {
/*
* m = merged region
* f = array formula
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java Sat Jan 9 18:24:51 2021
@@ -48,7 +48,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void sheetIterator_forEach() throws IOException {
+ void sheetIterator_forEach() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
wb.createSheet("Sheet0");
wb.createSheet("Sheet1");
@@ -67,7 +67,7 @@ public abstract class BaseTestWorkbook {
* underlying data has been reordered
*/
@Test
- public void sheetIterator_sheetsReordered() throws IOException {
+ void sheetIterator_sheetsReordered() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
wb.createSheet("Sheet0");
wb.createSheet("Sheet1");
@@ -88,7 +88,7 @@ public abstract class BaseTestWorkbook {
* underlying data has been reordered
*/
@Test
- public void sheetIterator_sheetRemoved() throws IOException {
+ void sheetIterator_sheetRemoved() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
wb.createSheet("Sheet0");
wb.createSheet("Sheet1");
@@ -107,7 +107,7 @@ public abstract class BaseTestWorkbook {
* should not be able to remove sheets from the sheet iterator
*/
@Test
- public void sheetIterator_remove() throws IOException {
+ void sheetIterator_remove() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
wb.createSheet("Sheet0");
@@ -119,7 +119,7 @@ public abstract class BaseTestWorkbook {
@Test
- public void createSheet() throws IOException {
+ void createSheet() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
assertEquals(0, wb.getNumberOfSheets());
@@ -211,7 +211,7 @@ public abstract class BaseTestWorkbook {
* but for the purpose of uniqueness long sheet names are silently truncated to 31 chars.
*/
@Test
- public void createSheetWithLongNames() throws IOException {
+ void createSheetWithLongNames() throws IOException {
try (Workbook wb1 = _testDataProvider.createWorkbook()) {
String sheetName1 = "My very long sheet name which is longer than 31 chars";
@@ -246,7 +246,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void removeSheetAt() throws IOException {
+ void removeSheetAt() throws IOException {
try (Workbook workbook = _testDataProvider.createWorkbook()) {
workbook.createSheet("sheet1");
workbook.createSheet("sheet2");
@@ -310,7 +310,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void defaultValues() throws IOException {
+ void defaultValues() throws IOException {
try (Workbook b = _testDataProvider.createWorkbook()) {
assertEquals(0, b.getActiveSheetIndex());
assertEquals(0, b.getFirstVisibleTab());
@@ -320,7 +320,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void sheetSelection() throws IOException {
+ void sheetSelection() throws IOException {
try (Workbook b = _testDataProvider.createWorkbook()) {
b.createSheet("Sheet One");
b.createSheet("Sheet Two");
@@ -333,7 +333,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void printArea() throws IOException {
+ void printArea() throws IOException {
try (Workbook workbook = _testDataProvider.createWorkbook()) {
Sheet sheet1 = workbook.createSheet("Test Print Area");
String sheetName1 = sheet1.getSheetName();
@@ -354,7 +354,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void getSetActiveSheet() throws IOException {
+ void getSetActiveSheet() throws IOException {
try (Workbook workbook = _testDataProvider.createWorkbook()) {
assertEquals(0, workbook.getActiveSheetIndex());
@@ -373,7 +373,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void setSheetOrder() throws IOException {
+ void setSheetOrder() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
for (int i = 0; i < 10; i++) {
@@ -441,7 +441,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void cloneSheet() throws IOException {
+ protected void cloneSheet() throws IOException {
try (Workbook book = _testDataProvider.createWorkbook()) {
Sheet sheet = book.createSheet("TEST");
sheet.createRow(0).createCell(0).setCellValue("Test");
@@ -470,7 +470,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void parentReferences() throws IOException {
+ protected void parentReferences() throws IOException {
try (Workbook wb1 = _testDataProvider.createWorkbook()) {
Sheet sheet = wb1.createSheet();
assertSame(wb1, sheet.getWorkbook());
@@ -503,7 +503,7 @@ public abstract class BaseTestWorkbook {
* is still working correctly
*/
@Test
- public void setRepeatingRowsAnsColumns() throws IOException {
+ void setRepeatingRowsAnsColumns() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
CellRangeAddress cra = new CellRangeAddress(0, 3, 0, 0);
String expRows = "1:4", expCols = "A:A";
@@ -528,7 +528,7 @@ public abstract class BaseTestWorkbook {
* Tests that all of the unicode capable string fields can be set, written and then read back
*/
@Test
- public void unicodeInAll() throws IOException {
+ protected void unicodeInAll() throws IOException {
try (Workbook wb1 = _testDataProvider.createWorkbook()) {
CreationHelper factory = wb1.getCreationHelper();
//Create a unicode dataformat (contains euro symbol)
@@ -645,7 +645,7 @@ public abstract class BaseTestWorkbook {
* @see <a href="https://issues.apache.org/bugzilla/show_bug.cgi?id=47100">Bugzilla 47100</a>
*/
@Test
- public void setSheetName() throws IOException {
+ protected void setSheetName() throws IOException {
try (Workbook wb1 = newSetSheetNameTestingWorkbook()) {
Sheet sh1 = wb1.getSheetAt(0);
@@ -724,7 +724,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void changeSheetNameWithSharedFormulas() throws IOException {
+ void changeSheetNameWithSharedFormulas() throws IOException {
String sampleFile = "shared_formulas.xls" + (getClass().getName().contains("xssf") ? "x" : "");
try (Workbook wb = _testDataProvider.openSampleWorkbook(sampleFile)) {
@@ -781,7 +781,7 @@ public abstract class BaseTestWorkbook {
@Test
- public void windowOneDefaults() throws IOException {
+ void windowOneDefaults() throws IOException {
try (Workbook b = _testDataProvider.createWorkbook()) {
assertEquals(b.getActiveSheetIndex(), 0);
assertEquals(b.getFirstVisibleTab(), 0);
@@ -790,7 +790,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void getSpreadsheetVersion() throws IOException {
+ void getSpreadsheetVersion() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
assertEquals(_testDataProvider.getSpreadsheetVersion(), wb.getSpreadsheetVersion());
}
@@ -805,7 +805,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void sheetClone() throws IOException {
+ protected void sheetClone() throws IOException {
// First up, try a simple file
try (Workbook b = _testDataProvider.createWorkbook();
Workbook bBack = HSSFTestDataSamples.openSampleWorkbook("SheetWithDrawing.xls")) {
@@ -825,7 +825,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void getSheetIndex() throws IOException {
+ void getSheetIndex() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sheet1 = wb.createSheet("Sheet1");
Sheet sheet2 = wb.createSheet("Sheet2");
@@ -850,7 +850,7 @@ public abstract class BaseTestWorkbook {
}
@Test
- public void addSheetTwice() throws IOException {
+ void addSheetTwice() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sheet1 = wb.createSheet("Sheet1");
assertNotNull(sheet1);
@@ -865,7 +865,7 @@ public abstract class BaseTestWorkbook {
// bug 51233 and 55075: correctly size image if added to a row with a custom height
@Test
- public void createDrawing() throws Exception {
+ void createDrawing() throws Exception {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sheet = wb.createSheet("Main Sheet");
Row row0 = sheet.createRow(0);
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestXEvaluationSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestXEvaluationSheet.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestXEvaluationSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestXEvaluationSheet.java Sat Jan 9 18:24:51 2021
@@ -31,7 +31,7 @@ public abstract class BaseTestXEvaluatio
protected abstract Map.Entry<Sheet, EvaluationSheet> getInstance();
@Test
- public void lastRowNumIsUpdatedFromUnderlyingSheet_bug62993() {
+ void lastRowNumIsUpdatedFromUnderlyingSheet_bug62993() {
Map.Entry<Sheet, EvaluationSheet> sheetPair = getInstance();
Sheet underlyingSheet = sheetPair.getKey();
EvaluationSheet instance = sheetPair.getValue();
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDateUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDateUtil.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDateUtil.java [UTF-8] (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDateUtil.java [UTF-8] Sat Jan 9 18:24:51 2021
@@ -65,7 +65,7 @@ public class TestDateUtil {
}
@Test
- public void getJavaDate_InvalidValue() {
+ void getJavaDate_InvalidValue() {
final double dateValue = -1;
final TimeZone tz = LocaleUtil.getUserTimeZone();
final boolean use1904windowing = false;
@@ -79,7 +79,7 @@ public class TestDateUtil {
}
@Test
- public void getJavaDate_ValidValue() {
+ void getJavaDate_ValidValue() {
final double dateValue = 0;
final TimeZone tz = LocaleUtil.getUserTimeZone();
final boolean use1904windowing = false;
@@ -96,7 +96,7 @@ public class TestDateUtil {
}
@Test
- public void getJavaCalendar_InvalidValue() {
+ void getJavaCalendar_InvalidValue() {
final double dateValue = -1;
final TimeZone tz = LocaleUtil.getUserTimeZone();
final boolean use1904windowing = false;
@@ -109,7 +109,7 @@ public class TestDateUtil {
}
@Test
- public void getJavaCalendar_ValidValue() {
+ void getJavaCalendar_ValidValue() {
final double dateValue = 0;
final TimeZone tz = LocaleUtil.getUserTimeZone();
final boolean use1904windowing = false;
@@ -130,7 +130,7 @@ public class TestDateUtil {
}
@Test
- public void getLocalDateTime_InvalidValue() {
+ void getLocalDateTime_InvalidValue() {
final double dateValue = -1;
final boolean use1904windowing = false;
final boolean roundSeconds = false;
@@ -141,7 +141,7 @@ public class TestDateUtil {
}
@Test
- public void getLocalDateTime_ValidValue() {
+ void getLocalDateTime_ValidValue() {
final double dateValue = 0;
final boolean use1904windowing = false;
final boolean roundSeconds = false;
@@ -155,7 +155,7 @@ public class TestDateUtil {
}
@Test
- public void isADateFormat() {
+ void isADateFormat() {
// Cell content 2016-12-8 as an example
// Cell show "12/8/2016"
assertTrue(DateUtil.isADateFormat(14, "m/d/yy"));
@@ -187,7 +187,7 @@ public class TestDateUtil {
* Checks the date conversion functions in the DateUtil class.
*/
@Test
- public void dateConversion() {
+ void dateConversion() {
// Iterating over the hours exposes any rounding issues.
Calendar cal = LocaleUtil.getLocaleCalendar(2002,JANUARY,1,0,1,1);
@@ -232,7 +232,7 @@ public class TestDateUtil {
* Daylight Saving Time starts.
*/
@Test
- public void excelConversionOnDSTStart() {
+ void excelConversionOnDSTStart() {
Calendar cal = LocaleUtil.getLocaleCalendar(2004,MARCH,28,0,0,0);
for (int hour = 0; hour < 24; hour++) {
@@ -270,7 +270,7 @@ public class TestDateUtil {
* Daylight Saving Time starts.
*/
@Test
- public void javaConversionOnDSTStart() {
+ void javaConversionOnDSTStart() {
Calendar cal = LocaleUtil.getLocaleCalendar(2004,MARCH,28,0,0,0);
double excelDate = DateUtil.getExcelDate(cal.getTime(), false);
double oneHour = 1.0 / 24;
@@ -303,7 +303,7 @@ public class TestDateUtil {
* Daylight Saving Time ends.
*/
@Test
- public void excelConversionOnDSTEnd() {
+ void excelConversionOnDSTEnd() {
Calendar cal = LocaleUtil.getLocaleCalendar(2004,OCTOBER,31,0,0,0);
for (int hour = 0; hour < 24; hour++) {
cal.set(Calendar.HOUR_OF_DAY, hour);
@@ -332,7 +332,7 @@ public class TestDateUtil {
* Daylight Saving Time ends.
*/
@Test
- public void javaConversionOnDSTEnd() {
+ void javaConversionOnDSTEnd() {
Calendar cal = LocaleUtil.getLocaleCalendar(2004,OCTOBER,31,0,0,0);
double excelDate = DateUtil.getExcelDate(cal.getTime(), false);
double oneHour = 1.0 / 24;
@@ -354,7 +354,7 @@ public class TestDateUtil {
* Tests that we deal with time-zones properly
*/
@Test
- public void calendarConversion() {
+ void calendarConversion() {
TimeZone userTZ = LocaleUtil.getUserTimeZone();
LocaleUtil.setUserTimeZone(TimeZone.getTimeZone("CET"));
try {
@@ -400,7 +400,7 @@ public class TestDateUtil {
* Tests that we correctly detect date formats as such
*/
@Test
- public void identifyDateFormats() {
+ void identifyDateFormats() {
// First up, try with a few built in date formats
short[] builtins = new short[] { 0x0e, 0x0f, 0x10, 0x16, 0x2d, 0x2e };
for (short builtin : builtins) {
@@ -492,7 +492,7 @@ public class TestDateUtil {
}
@Test
- public void excelDateBorderCases() throws ParseException {
+ void excelDateBorderCases() throws ParseException {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd", Locale.ROOT);
df.setTimeZone(LocaleUtil.getUserTimeZone());
@@ -511,7 +511,7 @@ public class TestDateUtil {
}
@Test
- public void dateBug_2Excel() {
+ void dateBug_2Excel() {
assertEquals(59.0, DateUtil.getExcelDate(createDate(1900, FEBRUARY, 28), false), 0.00001);
assertEquals(61.0, DateUtil.getExcelDate(createDate(1900, MARCH, 1), false), 0.00001);
@@ -531,7 +531,7 @@ public class TestDateUtil {
}
@Test
- public void dateBug_2Java() {
+ void dateBug_2Java() {
assertEquals(createDate(1900, FEBRUARY, 28), DateUtil.getJavaDate(59.0, false));
assertEquals(createDate(1900, MARCH, 1), DateUtil.getJavaDate(61.0, false));
@@ -551,7 +551,7 @@ public class TestDateUtil {
}
@Test
- public void date1904() {
+ void date1904() {
assertEquals(createDate(1904, JANUARY, 2), DateUtil.getJavaDate(1.0, true));
assertEquals(createDate(1904, JANUARY, 1), DateUtil.getJavaDate(0.0, true));
assertEquals(0.0, DateUtil.getExcelDate(createDate(1904, JANUARY, 1), true), 0.00001);
@@ -597,7 +597,7 @@ public class TestDateUtil {
* Check if DateUtil.getAbsoluteDay works as advertised.
*/
@Test
- public void absoluteDay() {
+ void absoluteDay() {
// 1 Jan 1900 is 1 day after 31 Dec 1899
Calendar cal = LocaleUtil.getLocaleCalendar(1900,JANUARY,1,0,0,0);
assertEquals(1, DateUtil.absoluteDay(cal, false), "Checking absolute day (1 Jan 1900)");
@@ -610,7 +610,7 @@ public class TestDateUtil {
}
@Test
- public void absoluteDayYearTooLow() {
+ void absoluteDayYearTooLow() {
Calendar cal = LocaleUtil.getLocaleCalendar(1899,JANUARY,1,0,0,0);
assertThrows(IllegalArgumentException.class, () -> DateUtil.absoluteDay(cal, false));
@@ -623,7 +623,7 @@ public class TestDateUtil {
}
@Test
- public void convertTime() {
+ void convertTime() {
final double delta = 1E-7; // a couple of digits more accuracy than strictly required
assertEquals(0.5, DateUtil.convertTime("12:00"), delta);
@@ -633,7 +633,7 @@ public class TestDateUtil {
}
@Test
- public void parseDate() {
+ void parseDate() {
assertEquals(createDate(2008, AUGUST, 3), DateUtil.parseYYYYMMDDDate("2008/08/03"));
assertEquals(createDate(1994, MAY, 1), DateUtil.parseYYYYMMDDDate("1994/05/01"));
}
@@ -642,7 +642,7 @@ public class TestDateUtil {
* Ensure that date values *with* a fractional portion get the right time of day
*/
@Test
- public void convertDateTime() {
+ void convertDateTime() {
// Excel day 30000 is date 18-Feb-1982
// 0.7 corresponds to time 16:48:00
Date actual = DateUtil.getJavaDate(30000.7);
@@ -660,7 +660,7 @@ public class TestDateUtil {
* Setting Cell's value to Jan 1, 1900 without a time doesn't return the same value set to
*/
@Test
- public void bug19172() throws IOException {
+ void bug19172() throws IOException {
try (HSSFWorkbook workbook = new HSSFWorkbook()) {
HSSFSheet sheet = workbook.createSheet();
HSSFCell cell = sheet.createRow(0).createCell(0);
@@ -683,7 +683,7 @@ public class TestDateUtil {
* that's formatted as ".0000"
*/
@Test
- public void bug54557() {
+ void bug54557() {
final String format = ".0000";
boolean isDateFormat = DateUtil.isADateFormat(165, format);
@@ -691,7 +691,7 @@ public class TestDateUtil {
}
@Test
- public void bug56269() {
+ void bug56269() {
double excelFraction = 41642.45833321759d;
Calendar calNoRound = DateUtil.getJavaCalendar(excelFraction, false);
assertEquals(10, calNoRound.get(Calendar.HOUR));
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestFractionFormat.java Sat Jan 9 18:24:51 2021
@@ -51,7 +51,7 @@ public final class TestFractionFormat {
@Disabled("Runs for some longer time")
@Test
- public void microBenchmark() {
+ void microBenchmark() {
FractionFormat f = new FractionFormat("", "##");
double val = 321.321;
for(int i = 0;i < 1000000;i++) {
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestIndexedColors.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestIndexedColors.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestIndexedColors.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestIndexedColors.java Sat Jan 9 18:24:51 2021
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test;
public final class TestIndexedColors {
@Test
- public void fromInt() {
+ void fromInt() {
int[] illegalIndices = { -1, 65 };
for (int index : illegalIndices) {
assertThrows(IllegalArgumentException.class, () -> IndexedColors.fromInt(index));
@@ -39,12 +39,12 @@ public final class TestIndexedColors {
}
@Test
- public void getIndex() {
+ void getIndex() {
assertEquals(51, IndexedColors.GOLD.getIndex());
}
@Test
- public void index() {
+ void index() {
assertEquals(51, IndexedColors.GOLD.index);
}
}
\ No newline at end of file
Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java Sat Jan 9 18:24:51 2021
@@ -55,7 +55,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void setCellStyleProperty() throws IOException {
+ void setCellStyleProperty() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet s = wb.createSheet();
Row r = s.createRow(0);
@@ -76,7 +76,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void setCellStylePropertyWithInvalidValue() throws IOException {
+ void setCellStylePropertyWithInvalidValue() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet s = wb.createSheet();
Row r = s.createRow(0);
@@ -88,7 +88,7 @@ public abstract class BaseTestCellUtil {
}
@Test()
- public void setCellStylePropertyBorderWithShortAndEnum() throws IOException {
+ void setCellStylePropertyBorderWithShortAndEnum() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet s = wb.createSheet();
Row r = s.createRow(0);
@@ -105,7 +105,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void setCellStyleProperties() throws IOException {
+ void setCellStyleProperties() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet s = wb.createSheet();
Row r = s.createRow(0);
@@ -133,7 +133,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void getRow() throws IOException {
+ void getRow() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sh = wb.createSheet();
Row row1 = sh.createRow(0);
@@ -149,7 +149,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void getCell() throws IOException {
+ void getCell() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sh = wb.createSheet();
Row row = sh.createRow(0);
@@ -166,7 +166,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void createCell() throws IOException {
+ void createCell() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sh = wb.createSheet();
Row row = sh.createRow(0);
@@ -205,7 +205,7 @@ public abstract class BaseTestCellUtil {
@Deprecated
@SuppressWarnings("deprecated")
@Test
- public void setAlignment() throws IOException {
+ void setAlignment() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sh = wb.createSheet();
Row row = sh.createRow(0);
@@ -233,7 +233,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void setAlignmentEnum() throws IOException {
+ void setAlignmentEnum() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
Sheet sh = wb.createSheet();
Row row = sh.createRow(0);
@@ -261,7 +261,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void setVerticalAlignmentEnum() throws IOException {
+ void setVerticalAlignmentEnum() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sh = wb.createSheet();
Row row = sh.createRow(0);
@@ -288,7 +288,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void setFont() throws IOException {
+ void setFont() throws IOException {
try (Workbook wb = _testDataProvider.createWorkbook()) {
Sheet sh = wb.createSheet();
Row row = sh.createRow(0);
@@ -320,7 +320,7 @@ public abstract class BaseTestCellUtil {
}
@Test
- public void setFontFromDifferentWorkbook() throws IOException {
+ void setFontFromDifferentWorkbook() throws IOException {
try (Workbook wb1 = _testDataProvider.createWorkbook();
Workbook wb2 = _testDataProvider.createWorkbook()) {
Font font1 = wb1.createFont();
@@ -344,7 +344,7 @@ public abstract class BaseTestCellUtil {
* @since POI 3.15 beta 3
*/
@Test
- public void setFillForegroundColorBeforeFillBackgroundColorEnum() throws IOException {
+ void setFillForegroundColorBeforeFillBackgroundColorEnum() throws IOException {
try (Workbook wb1 = _testDataProvider.createWorkbook()) {
Cell A1 = wb1.createSheet().createRow(0).createCell(0);
Map<String, Object> properties = new HashMap<>();
@@ -365,7 +365,7 @@ public abstract class BaseTestCellUtil {
* @since POI 4.1.0
*/
@Test
- public void setFontShouldNotCreateDuplicateStyle() throws IOException {
+ void setFontShouldNotCreateDuplicateStyle() throws IOException {
Workbook wb1 = _testDataProvider.createWorkbook();
Cell c = wb1.createSheet().createRow(1).createCell(1);
Font f = wb1.createFont();
Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/NumberComparingSpreadsheetGenerator.java Sat Jan 9 18:24:51 2021
@@ -55,7 +55,7 @@ public class NumberComparingSpreadsheetG
_rowIndex = 1;
}
- public void addTestRow(double a, double b, int expResult) {
+ void addTestRow(double a, double b, int expResult) {
writeDataRow(_sheet, _rowIndex++, a, b, expResult);
}
}
Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java Sat Jan 9 18:24:51 2021
@@ -61,7 +61,7 @@ public class NumberRenderingSpreadsheetG
_replacementNaNs = new ArrayList<>();
}
- public void addTestRow(long rawBits, String expectedExcelRendering) {
+ void addTestRow(long rawBits, String expectedExcelRendering) {
writeDataRow(_sheet, _rowIndex++, rawBits, expectedExcelRendering);
if(Double.isNaN(Double.longBitsToDouble(rawBits))) {
_replacementNaNs.add(Long.valueOf(rawBits));
Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellRangeAddress.java Sat Jan 9 18:24:51 2021
@@ -231,7 +231,7 @@ public final class TestCellRangeAddress
}
@Test
- public void containsRow() {
+ void containsRow() {
final CellRangeAddress region = new CellRangeAddress(10, 12, 3, 5);
assertFalse(region.containsRow(9));
@@ -242,7 +242,7 @@ public final class TestCellRangeAddress
}
@Test
- public void containsColumn() {
+ void containsColumn() {
final CellRangeAddress region = new CellRangeAddress(10, 12, 3, 5);
assertFalse(region.containsColumn(2));
@@ -253,7 +253,7 @@ public final class TestCellRangeAddress
}
@Test
- public void iterator() {
+ void iterator() {
final CellRangeAddress A1_B2 = new CellRangeAddress(0, 1, 0, 1);
// the cell address iterator iterates in row major order
Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestCellReference.java Sat Jan 9 18:24:51 2021
@@ -342,7 +342,7 @@ public final class TestCellReference {
* bug 59684: separateRefParts fails on entire-column references
*/
@Test
- public void entireColumnReferences() {
+ void entireColumnReferences() {
CellReference ref = new CellReference("HOME!$169");
assertEquals("HOME", ref.getSheetName());
assertEquals(168, ref.getRow());
@@ -352,7 +352,7 @@ public final class TestCellReference {
}
@Test
- public void getSheetName() {
+ void getSheetName() {
assertNull(new CellReference("A5").getSheetName());
assertNull(new CellReference(null, 0, 0, false, false).getSheetName());
// FIXME: CellReference is inconsistent
@@ -380,7 +380,7 @@ public final class TestCellReference {
}
@Test
- public void isRowWithinRange() {
+ void isRowWithinRange() {
SpreadsheetVersion ss = SpreadsheetVersion.EXCEL2007;
assertFalse(CellReference.isRowWithinRange("0", ss), "1 before first row");
assertTrue(CellReference.isRowWithinRange("1", ss), "first row");
@@ -395,19 +395,19 @@ public final class TestCellReference {
}
@Test
- public void isRowWithinRangeNonInteger_BigNumber() {
+ void isRowWithinRangeNonInteger_BigNumber() {
String rowNum = "4000000000";
assertFalse(CellReference.isRowWithinRange(rowNum, SpreadsheetVersion.EXCEL2007));
}
@Test
- public void isRowWithinRangeNonInteger_Alpha() {
+ void isRowWithinRangeNonInteger_Alpha() {
String rowNum = "NotANumber";
assertThrows(NumberFormatException.class, () -> CellReference.isRowWithinRange(rowNum, SpreadsheetVersion.EXCEL2007));
}
@Test
- public void isColWithinRange() {
+ void isColWithinRange() {
SpreadsheetVersion ss = SpreadsheetVersion.EXCEL2007;
assertTrue(CellReference.isColumnWithinRange("", ss), "(empty)");
assertTrue(CellReference.isColumnWithinRange("A", ss), "first column (A)");
@@ -416,17 +416,17 @@ public final class TestCellReference {
}
@Test
- public void unquotedSheetName() {
+ void unquotedSheetName() {
assertThrows(IllegalArgumentException.class, () -> new CellReference("'Sheet 1!A5"));
}
@Test
- public void mismatchedQuotesSheetName() {
+ void mismatchedQuotesSheetName() {
assertThrows(IllegalArgumentException.class, () -> new CellReference("Sheet 1!A5"));
}
@Test
- public void escapedSheetName() {
+ void escapedSheetName() {
String escapedName = "'Don''t Touch'!A5";
String unescapedName = "'Don't Touch'!A5";
new CellReference(escapedName);
@@ -435,22 +435,22 @@ public final class TestCellReference {
}
@Test
- public void negativeRow() {
+ void negativeRow() {
assertThrows(IllegalArgumentException.class, () -> new CellReference("sheet", -2, 0, false, false));
}
@Test
- public void negativeColumn() {
+ void negativeColumn() {
assertThrows(IllegalArgumentException.class, () -> new CellReference("sheet", 0, -2, false, false));
}
@Test
- public void classifyEmptyStringCellReference() {
+ void classifyEmptyStringCellReference() {
assertThrows(IllegalArgumentException.class, () -> CellReference.classifyCellReference("", SpreadsheetVersion.EXCEL2007));
}
@Test
- public void classifyInvalidFirstCharCellReference() {
+ void classifyInvalidFirstCharCellReference() {
assertThrows(IllegalArgumentException.class, () -> CellReference.classifyCellReference("!A5", SpreadsheetVersion.EXCEL2007));
}
Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestPropertyTemplate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestPropertyTemplate.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/TestPropertyTemplate.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestPropertyTemplate.java Sat Jan 9 18:24:51 2021
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
*/
public final class TestPropertyTemplate {
@Test
- public void getNumBorders() throws IOException {
+ void getNumBorders() throws IOException {
CellRangeAddress a1 = new CellRangeAddress(0, 0, 0, 0);
PropertyTemplate pt = new PropertyTemplate();
pt.drawBorders(a1, BorderStyle.THIN, BorderExtent.TOP);
@@ -52,7 +52,7 @@ public final class TestPropertyTemplate
}
@Test
- public void getNumBorderColors() throws IOException {
+ void getNumBorderColors() throws IOException {
CellRangeAddress a1 = new CellRangeAddress(0, 0, 0, 0);
PropertyTemplate pt = new PropertyTemplate();
pt.drawBorderColors(a1, IndexedColors.RED.getIndex(), BorderExtent.TOP);
@@ -64,7 +64,7 @@ public final class TestPropertyTemplate
}
@Test
- public void getTemplateProperties() throws IOException {
+ void getTemplateProperties() throws IOException {
CellRangeAddress a1 = new CellRangeAddress(0, 0, 0, 0);
PropertyTemplate pt = new PropertyTemplate();
pt.drawBorders(a1, BorderStyle.THIN, BorderExtent.TOP);
@@ -82,7 +82,7 @@ public final class TestPropertyTemplate
}
@Test
- public void drawBorders() throws IOException {
+ void drawBorders() throws IOException {
CellRangeAddress a1c3 = new CellRangeAddress(0, 2, 0, 2);
PropertyTemplate pt = new PropertyTemplate();
pt.drawBorders(a1c3, BorderStyle.THIN,
@@ -409,7 +409,7 @@ public final class TestPropertyTemplate
}
@Test
- public void drawBorderColors() throws IOException {
+ void drawBorderColors() throws IOException {
CellRangeAddress a1c3 = new CellRangeAddress(0, 2, 0, 2);
PropertyTemplate pt = new PropertyTemplate();
pt.drawBorderColors(a1c3, IndexedColors.RED.getIndex(),
@@ -801,7 +801,7 @@ public final class TestPropertyTemplate
}
@Test
- public void drawBordersWithColors() throws IOException {
+ void drawBordersWithColors() throws IOException {
CellRangeAddress a1c3 = new CellRangeAddress(0, 2, 0, 2);
PropertyTemplate pt = new PropertyTemplate();
@@ -849,7 +849,7 @@ public final class TestPropertyTemplate
}
@Test
- public void applyBorders() throws IOException {
+ void applyBorders() throws IOException {
CellRangeAddress a1c3 = new CellRangeAddress(0, 2, 0, 2);
CellRangeAddress b2 = new CellRangeAddress(1, 1, 1, 1);
PropertyTemplate pt = new PropertyTemplate();
@@ -910,7 +910,7 @@ public final class TestPropertyTemplate
}
@Test
- public void clonePropertyTemplate() throws IOException {
+ void clonePropertyTemplate() throws IOException {
CellRangeAddress a1c3 = new CellRangeAddress(0, 2, 0, 2);
PropertyTemplate pt = new PropertyTemplate();
pt.drawBorders(a1c3, BorderStyle.MEDIUM, IndexedColors.RED.getIndex(), BorderExtent.ALL);
Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestRegionUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestRegionUtil.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/TestRegionUtil.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestRegionUtil.java Sat Jan 9 18:24:51 2021
@@ -46,13 +46,13 @@ public final class TestRegionUtil {
private Sheet sheet;
@BeforeEach
- public void setUp() {
+ void setUp() {
wb = new HSSFWorkbook();
sheet = wb.createSheet();
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
wb.close();
}
@@ -65,7 +65,7 @@ public final class TestRegionUtil {
}
@Test
- public void setBorderTop() {
+ void setBorderTop() {
assertEquals(NONE, getCellStyle(0, 0).getBorderTop());
assertEquals(NONE, getCellStyle(0, 1).getBorderTop());
assertEquals(NONE, getCellStyle(0, 2).getBorderTop());
@@ -75,7 +75,7 @@ public final class TestRegionUtil {
assertEquals(THIN, getCellStyle(0, 2).getBorderTop());
}
@Test
- public void setBorderBottom() {
+ void setBorderBottom() {
assertEquals(NONE, getCellStyle(2, 0).getBorderBottom());
assertEquals(NONE, getCellStyle(2, 1).getBorderBottom());
assertEquals(NONE, getCellStyle(2, 2).getBorderBottom());
@@ -85,7 +85,7 @@ public final class TestRegionUtil {
assertEquals(THIN, getCellStyle(2, 2).getBorderBottom());
}
@Test
- public void setBorderRight() {
+ void setBorderRight() {
assertEquals(NONE, getCellStyle(0, 2).getBorderRight());
assertEquals(NONE, getCellStyle(1, 2).getBorderRight());
assertEquals(NONE, getCellStyle(2, 2).getBorderRight());
@@ -95,7 +95,7 @@ public final class TestRegionUtil {
assertEquals(THIN, getCellStyle(2, 2).getBorderRight());
}
@Test
- public void setBorderLeft() {
+ void setBorderLeft() {
assertEquals(NONE, getCellStyle(0, 0).getBorderLeft());
assertEquals(NONE, getCellStyle(1, 0).getBorderLeft());
assertEquals(NONE, getCellStyle(2, 0).getBorderLeft());
@@ -106,7 +106,7 @@ public final class TestRegionUtil {
}
@Test
- public void setTopBorderColor() {
+ void setTopBorderColor() {
assertEquals(DEFAULT_COLOR, getCellStyle(0, 0).getTopBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(0, 1).getTopBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(0, 2).getTopBorderColor());
@@ -116,7 +116,7 @@ public final class TestRegionUtil {
assertEquals(RED, getCellStyle(0, 2).getTopBorderColor());
}
@Test
- public void setBottomBorderColor() {
+ void setBottomBorderColor() {
assertEquals(DEFAULT_COLOR, getCellStyle(2, 0).getBottomBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(2, 1).getBottomBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(2, 2).getBottomBorderColor());
@@ -126,7 +126,7 @@ public final class TestRegionUtil {
assertEquals(RED, getCellStyle(2, 2).getBottomBorderColor());
}
@Test
- public void setRightBorderColor() {
+ void setRightBorderColor() {
assertEquals(DEFAULT_COLOR, getCellStyle(0, 2).getRightBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(1, 2).getRightBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(2, 2).getRightBorderColor());
@@ -136,7 +136,7 @@ public final class TestRegionUtil {
assertEquals(RED, getCellStyle(2, 2).getRightBorderColor());
}
@Test
- public void setLeftBorderColor() {
+ void setLeftBorderColor() {
assertEquals(DEFAULT_COLOR, getCellStyle(0, 0).getLeftBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(1, 0).getLeftBorderColor());
assertEquals(DEFAULT_COLOR, getCellStyle(2, 0).getLeftBorderColor());
@@ -147,14 +147,14 @@ public final class TestRegionUtil {
}
@Test
- public void bordersCanBeAddedToNonExistantCells() {
+ void bordersCanBeAddedToNonExistantCells() {
RegionUtil.setBorderTop(THIN, A1C3, sheet);
assertEquals(THIN, getCellStyle(0, 0).getBorderTop());
assertEquals(THIN, getCellStyle(0, 1).getBorderTop());
assertEquals(THIN, getCellStyle(0, 2).getBorderTop());
}
@Test
- public void borderColorsCanBeAddedToNonExistantCells() {
+ void borderColorsCanBeAddedToNonExistantCells() {
RegionUtil.setTopBorderColor(RED, A1C3, sheet);
assertEquals(RED, getCellStyle(0, 0).getTopBorderColor());
assertEquals(RED, getCellStyle(0, 1).getTopBorderColor());
Modified: poi/trunk/src/testcases/org/apache/poi/util/MemoryLeakVerifier.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/MemoryLeakVerifier.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/MemoryLeakVerifier.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/MemoryLeakVerifier.java Sat Jan 9 18:24:51 2021
@@ -31,12 +31,12 @@ import java.util.List;
* private final MemoryLeakVerifier verifier = new MemoryLeakVerifier();
{@literal}After
- public void tearDown() {
+ void tearDown() {
verifier.assertGarbageCollected();
}
{@literal}Test
- public void someTest() {
+ void someTest() {
...
verifier.addObject(object);
}
Modified: poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/TestHexDump.java Sat Jan 9 18:24:51 2021
@@ -24,7 +24,6 @@ import static org.junit.jupiter.api.Asse
import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
@@ -39,7 +38,7 @@ public class TestHexDump {
@BeforeAll
public static void setUp() throws UnsupportedEncodingException {
SYSTEM_OUT = System.out;
- System.setOut(new PrintStream(new OutputStream() {public void write(int b) {}}, false, "UTF-8"));
+ System.setOut(new NullPrintStream());
}
@AfterAll
@@ -110,7 +109,7 @@ public class TestHexDump {
StringBuilder format = new StringBuilder();
for (int j = 0; j < 16 && (index + j*16) < 256; j++) {
- obj[0] = offset+index+j*16;
+ obj[0] = offset+index+j*16L;
chrs.setLength(0);
format.setLength(0);
format.append("%08X ");
Modified: poi/trunk/src/testcases/org/apache/poi/util/TestLocaleUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestLocaleUtil.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/TestLocaleUtil.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/TestLocaleUtil.java Sat Jan 9 18:24:51 2021
@@ -43,7 +43,7 @@ public class TestLocaleUtil {
*/
@BeforeEach
@SuppressForbidden("implementation around default locales in POI")
- public void setUp() {
+ void setUp() {
// reset the user locale and time zone so that tests do not interfere with each other
// the other and better way would be to run each test in its own thread since
// LocaleUtil uses per-thread settings.
@@ -61,14 +61,14 @@ public class TestLocaleUtil {
* other tests.
*/
@AfterEach
- public void tearDown() {
+ void tearDown() {
LocaleUtil.resetUserLocale();
LocaleUtil.resetUserTimeZone();
}
@Test
@SuppressForbidden("implementation around default locales in POI")
- public void userLocale() {
+ void userLocale() {
Locale DEFAULT_LOCALE = LocaleUtil.getUserLocale();
assertEquals(DEFAULT_LOCALE, LocaleUtil.getUserLocale());
@@ -83,7 +83,7 @@ public class TestLocaleUtil {
@Test
@SuppressForbidden("implementation around default locales in POI")
- public void userTimeZone() {
+ void userTimeZone() {
TimeZone DEFAULT_TIME_ZONE = LocaleUtil.getUserTimeZone();
assertEquals(DEFAULT_TIME_ZONE, LocaleUtil.getUserTimeZone());
@@ -95,7 +95,7 @@ public class TestLocaleUtil {
@Test
@SuppressForbidden("implementation around default locales in POI")
- public void localeCalendar() {
+ void localeCalendar() {
Locale DEFAULT_LOCALE = LocaleUtil.getUserLocale();
TimeZone DEFAULT_TIME_ZONE = LocaleUtil.getUserTimeZone();
Calendar DEFAULT_CALENDAR = LocaleUtil.getLocaleCalendar();
Modified: poi/trunk/src/testcases/org/apache/poi/util/TestRLEDecompressingInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestRLEDecompressingInputStream.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/TestRLEDecompressingInputStream.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/TestRLEDecompressingInputStream.java Sat Jan 9 18:24:51 2021
@@ -55,7 +55,7 @@ public class TestRLEDecompressingInputSt
*
*/
@Test
- public void noCompressionExample() {
+ void noCompressionExample() {
final byte[] compressed = {
0x01, 0x19, (byte)0xB0, 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x00, 0x69, 0x6A, 0x6B, 0x6C,
0x6D, 0x6E, 0x6F, 0x70, 0x00, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x2E
@@ -92,7 +92,7 @@ public class TestRLEDecompressingInputSt
* 76 77 78 79 7A 61 61 61
*/
@Test
- public void normalCompressionExample() {
+ void normalCompressionExample() {
final byte[] compressed = {
0x01, 0x2F, (byte)0xB0, 0x00, 0x23, 0x61, 0x61, 0x61, 0x62, 0x63, 0x64, 0x65, (byte)0x82, 0x66, 0x00, 0x70,
0x61, 0x67, 0x68, 0x69, 0x6A, 0x01, 0x38, 0x08, 0x61, 0x6B, 0x6C, 0x00, 0x30, 0x6D, 0x6E, 0x6F,
@@ -129,7 +129,7 @@ public class TestRLEDecompressingInputSt
* 61 61 61 61 61 61 61 61 61
*/
@Test
- public void maximumCompressionExample() {
+ void maximumCompressionExample() {
final byte[] compressed = {
0x01, 0x03, (byte)0xB0, 0x02, 0x61, 0x45, 0x00
};
@@ -138,7 +138,7 @@ public class TestRLEDecompressingInputSt
}
@Test
- public void decompress() throws IOException {
+ void decompress() throws IOException {
final byte[] compressed = {
0x01, 0x03, (byte)0xB0, 0x02, 0x61, 0x45, 0x00
};
Modified: poi/trunk/src/testcases/org/apache/poi/util/TestStringUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestStringUtil.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/TestStringUtil.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/TestStringUtil.java Sat Jan 9 18:24:51 2021
@@ -106,7 +106,7 @@ public class TestStringUtil {
}
@Test
- public void startsWithIgnoreCase() {
+ void startsWithIgnoreCase() {
assertTrue(StringUtil.startsWithIgnoreCase("Apache POI", "Apache POI"), "same string");
assertTrue(StringUtil.startsWithIgnoreCase("Apache POI project", "Apache POI"), "longer string");
assertTrue(StringUtil.startsWithIgnoreCase("APACHE POI", "Apache POI"), "different case");
@@ -115,7 +115,7 @@ public class TestStringUtil {
}
@Test
- public void endsWithIgnoreCase() {
+ void endsWithIgnoreCase() {
assertTrue(StringUtil.endsWithIgnoreCase("Apache POI", "Apache POI"), "same string");
assertTrue(StringUtil.endsWithIgnoreCase("Project Apache POI", "Apache POI"), "longer string");
assertTrue(StringUtil.endsWithIgnoreCase("APACHE POI", "Apache POI"), "different case");
@@ -124,7 +124,7 @@ public class TestStringUtil {
}
@Test
- public void join() {
+ void join() {
assertEquals("", StringUtil.join(",")); // degenerate case: nothing to join
assertEquals("abc", StringUtil.join(",", "abc")); // degenerate case: one thing to join, no trailing comma
assertEquals("abc|def|ghi", StringUtil.join("|", "abc", "def", "ghi"));
@@ -136,7 +136,7 @@ public class TestStringUtil {
}
@Test
- public void count() {
+ void count() {
String test = "Apache POI project\n\u00a9 Copyright 2016";
// supports search in null or empty string
assertEquals(0, StringUtil.countMatches(null, 'A'), "null");
Modified: poi/trunk/src/testcases/org/apache/poi/util/TestTempFile.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/TestTempFile.java?rev=1885308&r1=1885307&r2=1885308&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/TestTempFile.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/TestTempFile.java Sat Jan 9 18:24:51 2021
@@ -37,7 +37,7 @@ public class TestTempFile {
private File tempDir;
@BeforeEach
- public void setUp() throws IOException {
+ void setUp() throws IOException {
previousTempDir = System.getProperty(TempFile.JAVA_IO_TMPDIR);
if(previousTempDir != null) {
assertTrue(new File(previousTempDir).exists() || new File(previousTempDir).mkdirs(),
@@ -52,7 +52,7 @@ public class TestTempFile {
}
@AfterEach
- public void tearDown() throws IOException {
+ void tearDown() throws IOException {
if(tempDir != null) {
String[] files = tempDir.list();
assertNotNull(files);
@@ -104,7 +104,7 @@ public class TestTempFile {
}
@Test
- public void createTempFileWithDefaultSuffix() throws IOException {
+ void createTempFileWithDefaultSuffix() throws IOException {
File tempFile = TempFile.createTempFile("test", null);
assertTrue(tempFile.getName().endsWith(".tmp"));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org