try to fix test compile

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879256 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-06-27 09:53:11 +00:00
parent 38e58f1ead
commit e43cbf5d46
2 changed files with 7 additions and 9 deletions

View File

@ -248,9 +248,7 @@ public final class TestAreaReference {
assertEquals(ref, HSSFFormulaParser.toFormulaString(wb, nr.getNameDefinition()));
// Check the high level definition
int idx = wb.getNameIndex("test");
assertEquals(0, idx);
HSSFName aNamedCell = wb.getNameAt(idx);
HSSFName aNamedCell = wb.getName("test");
// Should have 2 references
String formulaRefs = aNamedCell.getRefersToFormula();

View File

@ -687,9 +687,9 @@ public abstract class BaseTestWorkbook {
Sheet sh1 = wb1.getSheetAt(0);
Name sale_2 = wb1.getNameAt(1);
Name sale_3 = wb1.getNameAt(2);
Name sale_4 = wb1.getNameAt(3);
Name sale_2 = wb1.getName("sale_2");
Name sale_3 = wb1.getName("sale_3");
Name sale_4 = wb1.getName("sale_4");
assertEquals("sale_2", sale_2.getNameName());
assertEquals("'Testing 47100'!$A$1", sale_2.getRefersToFormula());
@ -736,9 +736,9 @@ public abstract class BaseTestWorkbook {
sh1 = wb2.getSheetAt(0);
sale_2 = wb2.getNameAt(1);
sale_3 = wb2.getNameAt(2);
sale_4 = wb2.getNameAt(3);
sale_2 = wb2.getName("sale_2");
sale_3 = wb2.getName("sale_3");
sale_4 = wb2.getName("sale_4");
cell0 = sh1.getRow(0).getCell(0);
cell1 = sh1.getRow(1).getCell(0);