FileDocCategorySizeDatePackage
TestCellReference.javaAPI DocApache Poi 3.0.14265Mon Jan 01 12:39:46 GMT 2007org.apache.poi.hssf.util

TestCellReference

public class TestCellReference extends TestCase

Fields Summary
Constructors Summary
public TestCellReference(String s)

        super(s);
    
Methods Summary
public static voidmain(java.lang.String[] args)

        System.out.println("Testing org.apache.poi.hssf.util.TestCellReference");
        junit.textui.TestRunner.run(TestCellReference.class);
    
public voidtestAbsRef1()

        CellReference cf = new CellReference("$B$5");
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",cf.isRowAbsolute());
        assertTrue("col is abs",cf.isColAbsolute());
        assertTrue("string is $B$5",cf.toString().equals("$B$5"));
    
public voidtestAbsRef2()

        CellReference cf = new CellReference(4,1,true,true);
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",cf.isRowAbsolute());
        assertTrue("col is abs",cf.isColAbsolute());
        assertTrue("string is $B$5",cf.toString().equals("$B$5"));
    
public voidtestAbsRef3()

        CellReference cf = new CellReference("B$5");
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",cf.isRowAbsolute());
        assertTrue("col is rel",!cf.isColAbsolute());
        assertTrue("string is B$5",cf.toString().equals("B$5"));
    
public voidtestAbsRef4()

        CellReference cf = new CellReference(4,1,true,false);
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",cf.isRowAbsolute());
        assertTrue("col is rel",!cf.isColAbsolute());
        assertTrue("string is B$5",cf.toString().equals("B$5"));
    
public voidtestAbsRef5()

        CellReference cf = new CellReference("$B5");
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",!cf.isRowAbsolute());
        assertTrue("col is rel",cf.isColAbsolute());
        assertTrue("string is B$5",cf.toString().equals("$B5"));
    
public voidtestAbsRef6()

        CellReference cf = new CellReference(4,1,false,true);
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",!cf.isRowAbsolute());
        assertTrue("col is rel",cf.isColAbsolute());
        assertTrue("string is B$5",cf.toString().equals("$B5"));
    
public voidtestAbsRef7()

        CellReference cf = new CellReference("B5");
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",!cf.isRowAbsolute());
        assertTrue("col is rel",!cf.isColAbsolute());
        assertTrue("string is B$5",cf.toString().equals("B5"));
    
public voidtestAbsRef8()

        CellReference cf = new CellReference(4,1,false,false);
        assertTrue("row is 4",cf.getRow()==4);
        assertTrue("col is 1",cf.getCol()==1);
        assertTrue("row is abs",!cf.isRowAbsolute());
        assertTrue("col is rel",!cf.isColAbsolute());
        assertTrue("string is B$5",cf.toString().equals("B5"));