*
*/
public final class TestAreaReference extends TestCase {
public void testAreaRef1() {
AreaReference ar = new AreaReference("$A$1:$B$2");
assertFalse("Two cells expected", ar.isSingleCell());
CellReference cf = ar.getFirstCell();
assertTrue("row is 4",cf.getRow()==0);
assertTrue("col is 1",cf.getCol()==0);
assertTrue("row is abs",cf.isRowAbsolute());
assertTrue("col is abs",cf.isColAbsolute());
assertTrue("string is $A$1",cf.formatAsString().equals("$A$1"));
cf = ar.getLastCell();
assertTrue("row is 4",cf.getRow()==1);
assertTrue("col is 1",cf.getCol()==1);
assertTrue("row is abs",cf.isRowAbsolute());
assertTrue("col is abs",cf.isColAbsolute());
assertTrue("string is $B$2",cf.formatAsString().equals("$B$2"));
CellReference[] refs = ar.getAllReferencedCells();
assertEquals(4, refs.length);
assertEquals(0, refs[0].getRow());
assertEquals(0, refs[0].getCol());
assertNull(refs[0].getSheetName());