diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-06-27 09:53:11 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-06-27 09:53:11 +0000 |
commit | e43cbf5d46424942112e82f8573ae3c2a5823fee (patch) | |
tree | b4d1196bccb2e15ad616e6495dbba5b7774d304e /src/testcases/org/apache/poi | |
parent | 38e58f1ead7ff22c7095d1f9f0c71196739467cd (diff) | |
download | poi-e43cbf5d46424942112e82f8573ae3c2a5823fee.tar.gz poi-e43cbf5d46424942112e82f8573ae3c2a5823fee.zip |
try to fix test compile
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/util/TestAreaReference.java | 4 | ||||
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java | 12 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java b/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java index 0870a011cc..fddd1e7603 100644 --- a/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java +++ b/src/testcases/org/apache/poi/hssf/util/TestAreaReference.java @@ -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(); diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java index 6ad3e2e5dd..6ab7dd52d1 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestWorkbook.java @@ -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); |