assertTrue( Double.isNaN( cell.getNumericCellValue() ));
}
public void testSetGetStringInline() throws Exception {
CTCell rawCell = CTCell.Factory.newInstance();
XSSFRow row = createParentObjects();
XSSFCell cell = new XSSFCell(row, rawCell);
// Default is shared string mode, so have to do this explicitly
rawCell.setT(STCellType.INLINE_STR);
assertEquals(STCellType.INT_INLINE_STR, rawCell.getT().intValue());
assertEquals(Cell.CELL_TYPE_STRING, cell.getCellType());
assertEquals("", cell.getRichStringCellValue().getString());
cell.setCellValue(new XSSFRichTextString("Foo"));
assertEquals(STCellType.INT_INLINE_STR, rawCell.getT().intValue());
assertEquals(Cell.CELL_TYPE_STRING, cell.getCellType());
assertEquals("Foo", cell.getRichStringCellValue().getString());
// To number and back to string, stops being inline
cell.setCellValue(1.4);
cell.setCellValue(new XSSFRichTextString("Foo2"));
assertEquals(STCellType.INT_S, rawCell.getT().intValue());
assertEquals(Cell.CELL_TYPE_STRING, cell.getCellType());
assertEquals("Foo2", cell.getRichStringCellValue().getString());
}