replaced use of deprecated calls to get string value from cell

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@479287 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Amol S. Deshmukh 2006-11-26 06:11:36 +00:00
parent 1fd5b611a3
commit ad43b3a7ab

View File

@ -51,7 +51,7 @@ public class GenericFormulaTestCase extends TestCase {
protected void assertEquals(String msg, HSSFCell expected, HSSFFormulaEvaluator.CellValue actual) {
if (expected != null && actual!=null) {
if (expected!=null && expected.getCellType() == HSSFCell.CELL_TYPE_STRING) {
String value = expected.getStringCellValue();
String value = expected.getRichStringCellValue().getString();
if (value.startsWith("#")) {
expected.setCellType(HSSFCell.CELL_TYPE_ERROR);
}
@ -79,7 +79,7 @@ public class GenericFormulaTestCase extends TestCase {
break;
case HSSFCell.CELL_TYPE_STRING:
assertEquals(msg, HSSFCell.CELL_TYPE_STRING, actual.getCellType());
assertEquals(msg, expected.getStringCellValue(), actual.getStringValue());
assertEquals(msg, expected.getRichStringCellValue().getString(), actual.getRichTextStringValue().getString());
break;
}
}