]> source.dussan.org Git - poi.git/commitdiff
make test easier to understand using A1 addresses instead of row+col numbers
authorJaven O'Neal <onealj@apache.org>
Sun, 6 Dec 2015 20:43:27 +0000 (20:43 +0000)
committerJaven O'Neal <onealj@apache.org>
Sun, 6 Dec 2015 20:43:27 +0000 (20:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1718216 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java

index 4929659f5007f35e946ef9cc3b4fed71657d6b80..0dd2bc23f0292d770609235b01a83188dbe0ee5a 100644 (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();
     }