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:
Javen O'Neal 2015-12-06 20:43:27 +00:00
parent a7fb6a7c54
commit 37622ec57e
1 changed files with 4 additions and 2 deletions

View File

@ -401,13 +401,15 @@ public abstract class BaseTestSheet {
cell = row.createCell(1);
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.shiftRows(1, 1, 1);
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();
}