]> source.dussan.org Git - poi.git/commitdiff
replaced use of deprecated calls to get string value from cell
authorAmol S. Deshmukh <amol@apache.org>
Sun, 26 Nov 2006 06:11:36 +0000 (06:11 +0000)
committerAmol S. Deshmukh <amol@apache.org>
Sun, 26 Nov 2006 06:11:36 +0000 (06:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@479287 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/testcases/org/apache/poi/hssf/record/formula/eval/GenericFormulaTestCase.java

index 95a67bc67bdc3dac9f11d723894873292c120998..f3d734b5773976a5bf2e73d82a5026d99d839313 100644 (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;
                 }
             }