aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss/usermodel
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2017-09-18 15:55:48 +0000
committerPJ Fanning <fanningpj@apache.org>2017-09-18 15:55:48 +0000
commit1e8ecbec04bbe9701898f321d2f3b3bd17d78f94 (patch)
tree60fc3a9b056a3f53773f11e0afee7af2d850c820 /src/testcases/org/apache/poi/ss/usermodel
parenta5f7a52b0d7be422045e413b86206159bb98ec0b (diff)
downloadpoi-1e8ecbec04bbe9701898f321d2f3b3bd17d78f94.tar.gz
poi-1e8ecbec04bbe9701898f321d2f3b3bd17d78f94.zip
change HyperLink getType to return HyperlinkType
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808737 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss/usermodel')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java42
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java34
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java2
3 files changed, 39 insertions, 39 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java
index 2492c20a81..27ac4c93a8 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java
@@ -256,36 +256,36 @@ public abstract class BaseTestRow {
row.createCell(5).setCellValue(4);
// First up, no policy given, uses default
- assertEquals(CellType.STRING, row.getCell(0).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(1).getCellTypeEnum());
+ assertEquals(CellType.STRING, row.getCell(0).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(1).getCellType());
assertEquals(null, row.getCell(2));
assertEquals(null, row.getCell(3));
- assertEquals(CellType.BLANK, row.getCell(4).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(5).getCellTypeEnum());
+ assertEquals(CellType.BLANK, row.getCell(4).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(5).getCellType());
// RETURN_NULL_AND_BLANK - same as default
- assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
+ assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
assertEquals(null, row.getCell(2, MissingCellPolicy.RETURN_NULL_AND_BLANK));
assertEquals(null, row.getCell(3, MissingCellPolicy.RETURN_NULL_AND_BLANK));
- assertEquals(CellType.BLANK, row.getCell(4, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
+ assertEquals(CellType.BLANK, row.getCell(4, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
// RETURN_BLANK_AS_NULL - nearly the same
- assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellTypeEnum());
+ assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
assertEquals(null, row.getCell(2, MissingCellPolicy.RETURN_BLANK_AS_NULL));
assertEquals(null, row.getCell(3, MissingCellPolicy.RETURN_BLANK_AS_NULL));
assertEquals(null, row.getCell(4, MissingCellPolicy.RETURN_BLANK_AS_NULL));
- assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellTypeEnum());
+ assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
// CREATE_NULL_AS_BLANK - creates as needed
- assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
- assertEquals(CellType.BLANK, row.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
- assertEquals(CellType.BLANK, row.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
- assertEquals(CellType.BLANK, row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
+ assertEquals(CellType.STRING, row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
+ assertEquals(CellType.BLANK, row.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
+ assertEquals(CellType.BLANK, row.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
+ assertEquals(CellType.BLANK, row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
// Check created ones get the right column
assertEquals(0, row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
@@ -300,12 +300,12 @@ public abstract class BaseTestRow {
// that that is now used if no policy given
workbook.setMissingCellPolicy(MissingCellPolicy.RETURN_BLANK_AS_NULL);
- assertEquals(CellType.STRING, row.getCell(0).getCellTypeEnum());
- assertEquals(CellType.NUMERIC, row.getCell(1).getCellTypeEnum());
+ assertEquals(CellType.STRING, row.getCell(0).getCellType());
+ assertEquals(CellType.NUMERIC, row.getCell(1).getCellType());
assertEquals(null, row.getCell(2));
assertEquals(null, row.getCell(3));
assertEquals(null, row.getCell(4));
- assertEquals(CellType.NUMERIC, row.getCell(5).getCellTypeEnum());
+ assertEquals(CellType.NUMERIC, row.getCell(5).getCellType());
workbook.close();
}
@@ -420,7 +420,7 @@ public abstract class BaseTestRow {
assertTrue(cell5 == it.next());
assertTrue(it.hasNext());
assertTrue(cell2 == it.next());
- assertEquals(CellType.STRING, cell5.getCellTypeEnum());
+ assertEquals(CellType.STRING, cell5.getCellType());
wb.close();
}
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
index bbc9ab7e73..7d25d634f5 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
@@ -133,7 +133,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
for(Cell acell : cells){
assertTrue(acell.isPartOfArrayFormulaGroup());
- assertEquals(CellType.FORMULA, acell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, acell.getCellType());
assertEquals("SUM(A1:A3*B1:B3)", acell.getCellFormula());
//retrieve the range and check it is the same
assertEquals(range.formatAsString(), acell.getArrayFormulaRange().formatAsString());
@@ -210,7 +210,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
for(Cell acell : cr){
assertFalse(acell.isPartOfArrayFormulaGroup());
- assertEquals(CellType.BLANK, acell.getCellTypeEnum());
+ assertEquals(CellType.BLANK, acell.getCellType());
}
// cells C4:C6 are not included in array formula,
@@ -279,7 +279,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
CellRange<? extends Cell> srange =
sheet.setArrayFormula("SUM(A4:A6,B4:B6)", CellRangeAddress.valueOf("B5"));
Cell scell = srange.getTopLeftCell();
- assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, scell.getCellType());
assertEquals(0.0, scell.getNumericCellValue(), 0);
scell.setCellValue(1.1);
assertEquals(1.1, scell.getNumericCellValue(), 0);
@@ -288,7 +288,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
CellRange<? extends Cell> mrange =
sheet.setArrayFormula("A1:A3*B1:B3", CellRangeAddress.valueOf("C1:C3"));
for(Cell mcell : mrange){
- assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, mcell.getCellType());
assertEquals(0.0, mcell.getNumericCellValue(), 0);
double fmlaResult = 1.2;
mcell.setCellValue(fmlaResult);
@@ -307,10 +307,10 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
CellRange<? extends Cell> srange =
sheet.setArrayFormula("SUM(A4:A6,B4:B6)", CellRangeAddress.valueOf("B5"));
Cell scell = srange.getTopLeftCell();
- assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, scell.getCellType());
assertEquals(0.0, scell.getNumericCellValue(), 0);
scell.setCellType(CellType.STRING);
- assertEquals(CellType.STRING, scell.getCellTypeEnum());
+ assertEquals(CellType.STRING, scell.getCellType());
scell.setCellValue("string cell");
assertEquals("string cell", scell.getStringCellValue());
@@ -319,7 +319,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
sheet.setArrayFormula("A1:A3*B1:B3", CellRangeAddress.valueOf("C1:C3"));
for(Cell mcell : mrange){
try {
- assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, mcell.getCellType());
mcell.setCellType(CellType.NUMERIC);
fail("expected exception");
} catch (IllegalStateException e){
@@ -329,7 +329,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
}
// a failed invocation of Cell.setCellType leaves the cell
// in the state that it was in prior to the invocation
- assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, mcell.getCellType());
assertTrue(mcell.isPartOfArrayFormulaGroup());
}
workbook.close();
@@ -344,13 +344,13 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
sheet.setArrayFormula("SUM(A4:A6,B4:B6)", CellRangeAddress.valueOf("B5"));
Cell scell = srange.getTopLeftCell();
assertEquals("SUM(A4:A6,B4:B6)", scell.getCellFormula());
- assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, scell.getCellType());
assertTrue(scell.isPartOfArrayFormulaGroup());
scell.setCellFormula("SUM(A4,A6)");
//we are now a normal formula cell
assertEquals("SUM(A4,A6)", scell.getCellFormula());
assertFalse(scell.isPartOfArrayFormulaGroup());
- assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, scell.getCellType());
//check that setting formula result works
assertEquals(0.0, scell.getNumericCellValue(), 0);
scell.setCellValue(33.0);
@@ -396,7 +396,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
//re-create the removed cell
scell = srow.createCell(cra.getFirstColumn());
- assertEquals(CellType.BLANK, scell.getCellTypeEnum());
+ assertEquals(CellType.BLANK, scell.getCellType());
assertFalse(scell.isPartOfArrayFormulaGroup());
//we cannot remove cells included in a multi-cell array formula
@@ -417,7 +417,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
// in the state that it was in prior to the invocation
assertSame(mcell, mrow.getCell(columnIndex));
assertTrue(mcell.isPartOfArrayFormulaGroup());
- assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, mcell.getCellType());
}
workbook.close();
@@ -433,7 +433,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
CellRange<? extends Cell> srange =
sheet.setArrayFormula("SUM(A4:A6,B4:B6)", cra);
Cell scell = srange.getTopLeftCell();
- assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, scell.getCellType());
Row srow = scell.getRow();
assertSame(srow, sheet.getRow(cra.getFirstRow()));
@@ -442,7 +442,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
//re-create the removed row and cell
scell = sheet.createRow(cra.getFirstRow()).createCell(cra.getFirstColumn());
- assertEquals(CellType.BLANK, scell.getCellTypeEnum());
+ assertEquals(CellType.BLANK, scell.getCellType());
assertFalse(scell.isPartOfArrayFormulaGroup());
//we cannot remove rows with cells included in a multi-cell array formula
@@ -463,7 +463,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
assertSame(mrow, sheet.getRow(mrow.getRowNum()));
assertSame(mcell, mrow.getCell(columnIndex));
assertTrue(mcell.isPartOfArrayFormulaGroup());
- assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, mcell.getCellType());
}
workbook.close();
@@ -481,7 +481,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
Cell scell = srange.getTopLeftCell();
sheet.addMergedRegion(CellRangeAddress.valueOf("B5:C6"));
//we are still an array formula
- assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, scell.getCellType());
assertTrue(scell.isPartOfArrayFormulaGroup());
assertEquals(1, sheet.getNumMergedRegions());
@@ -570,7 +570,7 @@ public abstract class BaseTestSheetUpdateArrayFormulas {
assertEquals(cra.formatAsString(), mcell.getArrayFormulaRange().formatAsString());
assertEquals("A2:A4*B2:B4", mcell.getCellFormula());
assertTrue(mcell.isPartOfArrayFormulaGroup());
- assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, mcell.getCellType());
}
*/
diff --git a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
index fb81622509..b642de340e 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
@@ -811,7 +811,7 @@ public class TestDataFormatter {
CellReference ref = new CellReference("D47");
Cell cell = wb.getSheetAt(0).getRow(ref.getRow()).getCell(ref.getCol());
- assertEquals(CellType.FORMULA, cell.getCellTypeEnum());
+ assertEquals(CellType.FORMULA, cell.getCellType());
assertEquals("G9:K9 I7:I12", cell.getCellFormula());
DataFormatter formatter = new DataFormatter();