poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1718216 - /poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
Date Sun, 06 Dec 2015 20:43:28 GMT
Author: onealj
Date: Sun Dec  6 20:43:27 2015
New Revision: 1718216

URL: http://svn.apache.org/viewvc?rev=1718216&view=rev
Log:
make test easier to understand using A1 addresses instead of row+col numbers

Modified:
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java?rev=1718216&r1=1718215&r2=1718216&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java Sun Dec  6 20:43:27
2015
@@ -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();
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message