Package algebratospreadsheet

Source Code of algebratospreadsheet.CellAddressFactoryTest

package algebratospreadsheet;

import org.testng.annotations.Test;

import core.CellAddressFactory;

/**
*
* @author jsroka
*/
public class CellAddressFactoryTest {

    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testConstructor1() {
        new CellAddressFactory(0);
    }

    @Test(expectedExceptions = IllegalArgumentException.class)
    public void testConstructor2() {
        new CellAddressFactory(-1);
    }

    @Test
    public void testIsThereHelperRow() {
        System.out.println("isThereHelperRow");
//        CellAddressFactory instance;
//        boolean expResult;
//        boolean result;

//        instance = new CellAddressFactory(1);
//        expResult = false;
//        result = instance.isThereHelperColumn();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeColumnI();
//        expResult = false;
//        result = instance.isThereHelperColumn();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeCell();
//        expResult = true;
//        result = instance.isThereHelperColumn();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeCell();
//        instance.nextFreeCell();
//        instance.nextFreeColumnI();
//        instance.nextFreeCell();
//        expResult = true;
//        result = instance.isThereHelperColumn();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeColumnI();
//        instance.nextFreeColumnI();
//        instance.nextFreeColumnI();
//        expResult = false;
//        result = instance.isThereHelperColumn();
//        assertEquals(expResult, result);
//        instance.nextFreeCell();
//        expResult = true;
//        result = instance.isThereHelperColumn();
//        assertEquals(expResult, result);
    }

//    @Test
//    public void testNextFreeCell() {
//        System.out.println("nextFreeCell");
//        CellAddressFactory instance;
//        Cell expResult;
//        Cell result;
//
//        instance = new CellAddressFactory(1);
//        expResult = new Cell(1, 1);
//        result = instance.nextFreeCell();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(3);
//        expResult = new Cell(3, 1);
//        result = instance.nextFreeCell();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeColumnI();
//        instance.nextFreeColumnI();
//        expResult = new Cell(3, 1);
//        result = instance.nextFreeCell();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeCell();
//        instance.nextFreeCell();
//        expResult = new Cell(1, 3);
//        result = instance.nextFreeCell();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeColumnI();
//        instance.nextFreeCell();
//        instance.nextFreeColumnI();
//        expResult = new Cell(2, 2);
//        result = instance.nextFreeCell();
//        assertEquals(expResult, result);
//    }
//
//    @Test
//    public void testNextFreeRow() {
//        System.out.println("nextFreeRow");
//        CellAddressFactory instance;
//        int expResult;
//        int result;
//
//        instance = new CellAddressFactory(1);
//        expResult = 1;
//        result = instance.nextFreeColumnI();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(3);
//        instance.nextFreeColumnI();
//        instance.nextFreeColumnI();
//        expResult = 5;
//        result = instance.nextFreeColumnI();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeCell();
//        expResult = 2;
//        result = instance.nextFreeColumnI();
//        assertEquals(expResult, result);
//
//        instance = new CellAddressFactory(1);
//        instance.nextFreeColumnI();
//        instance.nextFreeColumnI();
//        instance.nextFreeCell();
//        instance.nextFreeColumnI();
//        expResult = 5;
//        result = instance.nextFreeColumnI();
//        assertEquals(expResult, result);
//    }
}
TOP

Related Classes of algebratospreadsheet.CellAddressFactoryTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.