Package bad.robot.excel.cell

Examples of bad.robot.excel.cell.DoubleCell


        assertThat(createCell("Text"), equalTo(new StringCell("Text")));
    }

    @Test
    public void matches() {
        assertThat(equalTo(new DoubleCell(0.44444d)).matches(createCell(0.44444d)), is(true));
    }
View Full Code Here


        assertThat(equalTo(new DoubleCell(0.44444d)).matches(createCell(0.44444d)), is(true));
    }

    @Test
    public void doesNotMatch() {
        assertThat(equalTo(new DoubleCell(0.44444d)).matches(createCell(0.4444d)), is(false));
    }
View Full Code Here

        assertThat(equalTo(new DoubleCell(0.44444d)).matches(createCell(0.4444d)), is(false));
    }

    @Test
    public void description() {
        equalTo(new DoubleCell(0.44444d)).describeTo(description);
        assertThat(description.toString(), is("<0.44444D>"));
    }
View Full Code Here

    public void replaceNonDateCellWithACell() throws IOException {
        Workbook workbook = getWorkbook("cellTypes.xls");
        PoiWorkbook sheet = new PoiWorkbook(workbook);
        Coordinate coordinate = coordinate(B, 2);

        assertThat(getCellForCoordinate(coordinate, workbook), equalTo(new DoubleCell(1001d)));
        sheet.replaceCell(coordinate, createDate(15, MARCH, 2012));

        assertThat(getCellForCoordinate(coordinate, workbook), equalTo(new DateCell(createDate(15, MARCH, 2012))));
        assertThat(getCellDataFormatAtCoordinate(coordinate, workbook), is("dd-MMM-yyyy"));
        assertThat("should not have affected a shared data format", getCellDataFormatAtCoordinate(coordinate(B, 7), workbook), is("General"));
View Full Code Here

    private final Border border = border(top(None), right(None), bottom(ThinSolid), left(ThinSolid));
    private final DataFormat numberFormat = asTwoDecimalPlacesNumber();

    @Test
    public void exampleOfCreatingARow() throws Exception {
        Cell cell = new DoubleCell(9999.99d, aStyle().with(border).with(numberFormat));

        HashMap<ColumnIndex, Cell> columns = new HashMap<ColumnIndex, Cell>();
        columns.put(column(A), cell);

        Row row = new Row(columns);
View Full Code Here

TOP

Related Classes of bad.robot.excel.cell.DoubleCell

Copyright © 2018 www.massapicom. 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.