From 125dad12474213901e5ccde0305e092f6199f454 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sun, 6 Dec 2015 20:43:27 +0000 Subject: [PATCH] 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 --- .../org/apache/poi/ss/usermodel/BaseTestSheet.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java index 4929659f50..0dd2bc23f0 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java @@ -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(); } -- 2.39.5