make test easier to understand using A1 addresses instead of row+col numbers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1718216 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a7fb6a7c54
commit
37622ec57e
@ -401,13 +401,15 @@ public abstract class BaseTestSheet {
|
|||||||
cell = row.createCell(1);
|
cell = row.createCell(1);
|
||||||
cell.setCellValue(factory.createRichTextString("second row, second cell"));
|
cell.setCellValue(factory.createRichTextString("second row, second cell"));
|
||||||
|
|
||||||
CellRangeAddress region = new CellRangeAddress(1, 1, 0, 1);
|
CellRangeAddress region = CellRangeAddress.valueOf("A2:B2");
|
||||||
sheet.addMergedRegion(region);
|
sheet.addMergedRegion(region);
|
||||||
|
|
||||||
sheet.shiftRows(1, 1, 1);
|
sheet.shiftRows(1, 1, 1);
|
||||||
|
|
||||||
region = sheet.getMergedRegion(0);
|
region = sheet.getMergedRegion(0);
|
||||||
assertEquals("Merged region not moved over to row 2", 2, region.getFirstRow());
|
|
||||||
|
CellRangeAddress expectedRegion = CellRangeAddress.valueOf("A3:B3");
|
||||||
|
assertEquals("Merged region should shift down a row", expectedRegion, region);
|
||||||
|
|
||||||
wb.close();
|
wb.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user