aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2017-10-22 12:45:35 +0000
committerPJ Fanning <fanningpj@apache.org>2017-10-22 12:45:35 +0000
commit2cd8c7bc6568238ea504b50566ac8c812827948b (patch)
tree04b917781e177b7ae0ab0918cdd0116461796081 /src/testcases
parentdffa1ccd9c3260ba0671066c32ee6fc513e422d9 (diff)
downloadpoi-2cd8c7bc6568238ea504b50566ac8c812827948b.tar.gz
poi-2cd8c7bc6568238ea504b50566ac8c812827948b.zip
Remove use of deprecated methods
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812907 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java12
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java10
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java4
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java2
-rw-r--r--src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java28
5 files changed, 28 insertions, 28 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java b/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
index 6505a391db..844b61270d 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
@@ -232,17 +232,17 @@ public final class TestCellStyle extends TestCase {
orig.setFont(fnt);
orig.setDataFormat((short)18);
- assertEquals(HorizontalAlignment.JUSTIFY, orig.getAlignmentEnum());
+ assertEquals(HorizontalAlignment.JUSTIFY, orig.getAlignment());
assertEquals(fnt, orig.getFont(wb));
assertEquals(18, orig.getDataFormat());
HSSFCellStyle clone = wb.createCellStyle();
- assertFalse(HorizontalAlignment.RIGHT == clone.getAlignmentEnum());
+ assertFalse(HorizontalAlignment.RIGHT == clone.getAlignment());
assertFalse(fnt == clone.getFont(wb));
assertFalse(18 == clone.getDataFormat());
clone.cloneStyleFrom(orig);
- assertEquals(HorizontalAlignment.JUSTIFY, clone.getAlignmentEnum());
+ assertEquals(HorizontalAlignment.JUSTIFY, clone.getAlignment());
assertEquals(fnt, clone.getFont(wb));
assertEquals(18, clone.getDataFormat());
assertEquals(5, wb.getNumberOfFonts());
@@ -268,7 +268,7 @@ public final class TestCellStyle extends TestCase {
orig.setFont(fnt);
orig.setDataFormat(fmt.getFormat("Test##"));
- assertEquals(HorizontalAlignment.RIGHT, orig.getAlignmentEnum());
+ assertEquals(HorizontalAlignment.RIGHT, orig.getAlignment());
assertEquals(fnt, orig.getFont(wbOrig));
assertEquals(fmt.getFormat("Test##"), orig.getDataFormat());
@@ -280,11 +280,11 @@ public final class TestCellStyle extends TestCase {
HSSFCellStyle clone = wbClone.createCellStyle();
assertEquals(4, wbClone.getNumberOfFonts());
- assertFalse(HorizontalAlignment.RIGHT == clone.getAlignmentEnum());
+ assertFalse(HorizontalAlignment.RIGHT == clone.getAlignment());
assertFalse("TestingFont" == clone.getFont(wbClone).getFontName());
clone.cloneStyleFrom(orig);
- assertEquals(HorizontalAlignment.RIGHT, clone.getAlignmentEnum());
+ assertEquals(HorizontalAlignment.RIGHT, clone.getAlignment());
assertEquals("TestingFont", clone.getFont(wbClone).getFontName());
assertEquals(fmtClone.getFormat("Test##"), clone.getDataFormat());
assertFalse(fmtClone.getFormat("Test##") == fmt.getFormat("Test##"));
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
index f2f572458d..58e07d65b6 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
@@ -103,7 +103,7 @@ public final class TestHSSFPalette {
assertEquals(64, cellA.getCellStyle().getFillForegroundColor());
assertEquals(64, cellA.getCellStyle().getFillBackgroundColor());
assertEquals(Font.COLOR_NORMAL, cellA.getCellStyle().getFont(book).getColor());
- assertEquals(FillPatternType.NO_FILL, cellA.getCellStyle().getFillPatternEnum());
+ assertEquals(FillPatternType.NO_FILL, cellA.getCellStyle().getFillPattern());
assertEquals("0:0:0", p.getColor((short)64).getHexString());
assertEquals(null, p.getColor((short)32767));
@@ -112,7 +112,7 @@ public final class TestHSSFPalette {
assertEquals(64, cellB.getCellStyle().getFillForegroundColor());
assertEquals(64, cellB.getCellStyle().getFillBackgroundColor());
assertEquals(10, cellB.getCellStyle().getFont(book).getColor());
- assertEquals(FillPatternType.NO_FILL, cellB.getCellStyle().getFillPatternEnum());
+ assertEquals(FillPatternType.NO_FILL, cellB.getCellStyle().getFillPattern());
assertEquals("0:0:0", p.getColor((short)64).getHexString());
assertEquals("FFFF:0:0", p.getColor((short)10).getHexString());
@@ -121,7 +121,7 @@ public final class TestHSSFPalette {
assertEquals(11, cellC.getCellStyle().getFillForegroundColor());
assertEquals(64, cellC.getCellStyle().getFillBackgroundColor());
assertEquals(10, cellC.getCellStyle().getFont(book).getColor());
- assertEquals(FillPatternType.SOLID_FOREGROUND, cellC.getCellStyle().getFillPatternEnum());
+ assertEquals(FillPatternType.SOLID_FOREGROUND, cellC.getCellStyle().getFillPattern());
assertEquals("0:FFFF:0", p.getColor((short)11).getHexString());
assertEquals("FFFF:0:0", p.getColor((short)10).getHexString());
@@ -130,7 +130,7 @@ public final class TestHSSFPalette {
assertEquals(13, cellD.getCellStyle().getFillForegroundColor());
assertEquals(64, cellD.getCellStyle().getFillBackgroundColor());
assertEquals(14, cellD.getCellStyle().getFont(book).getColor());
- assertEquals(FillPatternType.NO_FILL, cellD.getCellStyle().getFillPatternEnum());
+ assertEquals(FillPatternType.NO_FILL, cellD.getCellStyle().getFillPattern());
assertEquals("FFFF:FFFF:0", p.getColor((short)13).getHexString());
assertEquals("FFFF:0:FFFF", p.getColor((short)14).getHexString());
@@ -139,7 +139,7 @@ public final class TestHSSFPalette {
assertEquals(13, cellE.getCellStyle().getFillForegroundColor());
assertEquals(64, cellE.getCellStyle().getFillBackgroundColor());
assertEquals(14, cellE.getCellStyle().getFont(book).getColor());
- assertEquals(FillPatternType.NO_FILL, cellE.getCellStyle().getFillPatternEnum());
+ assertEquals(FillPatternType.NO_FILL, cellE.getCellStyle().getFillPattern());
assertEquals("FFFF:FFFF:0", p.getColor((short)13).getHexString());
assertEquals("FFFF:0:FFFF", p.getColor((short)14).getHexString());
}
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java b/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
index dfdff98d02..666e72dc87 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestRowStyle.java
@@ -160,7 +160,7 @@ public final class TestRowStyle extends TestCase {
assertEquals("Right Border Style for row:", BorderStyle.THIN, cs.getBorderRightEnum());
assertEquals("Top Border Style for row:", BorderStyle.THIN, cs.getBorderTopEnum());
assertEquals("FillForegroundColor for row:", 0xA, cs.getFillForegroundColor());
- assertEquals("FillPattern for row:", FillPatternType.BRICKS, cs.getFillPatternEnum());
+ assertEquals("FillPattern for row:", FillPatternType.BRICKS, cs.getFillPattern());
rownum++;
if (rownum >= 100) break; // I feel too lazy to check if this isreqd :-/
@@ -169,7 +169,7 @@ public final class TestRowStyle extends TestCase {
assertNotNull("Row is not null", r);
cs2 = r.getRowStyle();
assertEquals("FillForegroundColor for row: ", cs2.getFillForegroundColor(), (short) 0x0);
- assertEquals("FillPattern for row: ", cs2.getFillPatternEnum(), FillPatternType.BRICKS);
+ assertEquals("FillPattern for row: ", cs2.getFillPattern(), FillPatternType.BRICKS);
}
IOUtils.closeQuietly(wb2);
}
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
index 00bd9d3cf0..0f1079c9c0 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
@@ -715,7 +715,7 @@ public abstract class BaseTestCell {
assertFalse(style.getHidden());
assertEquals(0, style.getIndention());
assertEquals(0, style.getFontIndex());
- assertEquals(HorizontalAlignment.GENERAL, style.getAlignmentEnum());
+ assertEquals(HorizontalAlignment.GENERAL, style.getAlignment());
assertEquals(0, style.getDataFormat());
assertEquals(false, style.getWrapText());
diff --git a/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java b/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
index e7af379fd0..090cf0ccb8 100644
--- a/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
+++ b/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java
@@ -224,17 +224,17 @@ public class BaseTestCellUtil {
// should be assertSame, but a new HSSFCellStyle is returned for each getCellStyle() call.
// HSSFCellStyle wraps an underlying style record, and the underlying
// style record is the same between multiple getCellStyle() calls.
- assertEquals(HorizontalAlignment.GENERAL, A1.getCellStyle().getAlignmentEnum());
- assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignmentEnum());
+ assertEquals(HorizontalAlignment.GENERAL, A1.getCellStyle().getAlignment());
+ assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignment());
// get/set alignment modifies the cell's style
CellUtil.setAlignment(A1, HorizontalAlignment.RIGHT);
- assertEquals(HorizontalAlignment.RIGHT, A1.getCellStyle().getAlignmentEnum());
+ assertEquals(HorizontalAlignment.RIGHT, A1.getCellStyle().getAlignment());
// get/set alignment doesn't affect the style of cells with
// the same style prior to modifying the style
assertNotEquals(A1.getCellStyle(), B1.getCellStyle());
- assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignmentEnum());
+ assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignment());
wb.close();
}
@@ -252,17 +252,17 @@ public class BaseTestCellUtil {
// should be assertSame, but a new HSSFCellStyle is returned for each getCellStyle() call.
// HSSFCellStyle wraps an underlying style record, and the underlying
// style record is the same between multiple getCellStyle() calls.
- assertEquals(HorizontalAlignment.GENERAL, A1.getCellStyle().getAlignmentEnum());
- assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignmentEnum());
+ assertEquals(HorizontalAlignment.GENERAL, A1.getCellStyle().getAlignment());
+ assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignment());
// get/set alignment modifies the cell's style
CellUtil.setAlignment(A1, HorizontalAlignment.RIGHT);
- assertEquals(HorizontalAlignment.RIGHT, A1.getCellStyle().getAlignmentEnum());
+ assertEquals(HorizontalAlignment.RIGHT, A1.getCellStyle().getAlignment());
// get/set alignment doesn't affect the style of cells with
// the same style prior to modifying the style
assertNotEquals(A1.getCellStyle(), B1.getCellStyle());
- assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignmentEnum());
+ assertEquals(HorizontalAlignment.GENERAL, B1.getCellStyle().getAlignment());
wb.close();
}
@@ -280,17 +280,17 @@ public class BaseTestCellUtil {
// should be assertSame, but a new HSSFCellStyle is returned for each getCellStyle() call.
// HSSFCellStyle wraps an underlying style record, and the underlying
// style record is the same between multiple getCellStyle() calls.
- assertEquals(VerticalAlignment.BOTTOM, A1.getCellStyle().getVerticalAlignmentEnum());
- assertEquals(VerticalAlignment.BOTTOM, B1.getCellStyle().getVerticalAlignmentEnum());
+ assertEquals(VerticalAlignment.BOTTOM, A1.getCellStyle().getVerticalAlignment());
+ assertEquals(VerticalAlignment.BOTTOM, B1.getCellStyle().getVerticalAlignment());
// get/set alignment modifies the cell's style
CellUtil.setVerticalAlignment(A1, VerticalAlignment.TOP);
- assertEquals(VerticalAlignment.TOP, A1.getCellStyle().getVerticalAlignmentEnum());
+ assertEquals(VerticalAlignment.TOP, A1.getCellStyle().getVerticalAlignment());
// get/set alignment doesn't affect the style of cells with
// the same style prior to modifying the style
assertNotEquals(A1.getCellStyle(), B1.getCellStyle());
- assertEquals(VerticalAlignment.BOTTOM, B1.getCellStyle().getVerticalAlignmentEnum());
+ assertEquals(VerticalAlignment.BOTTOM, B1.getCellStyle().getVerticalAlignment());
wb.close();
}
@@ -375,7 +375,7 @@ public class BaseTestCellUtil {
CellUtil.setCellStyleProperties(A1, properties);
CellStyle style = A1.getCellStyle();
- assertEquals("fill pattern", FillPatternType.BRICKS, style.getFillPatternEnum());
+ assertEquals("fill pattern", FillPatternType.BRICKS, style.getFillPattern());
assertEquals("fill foreground color", IndexedColors.BLUE, IndexedColors.fromInt(style.getFillForegroundColor()));
assertEquals("fill background color", IndexedColors.RED, IndexedColors.fromInt(style.getFillBackgroundColor()));
wb1.close();
@@ -395,7 +395,7 @@ public class BaseTestCellUtil {
CellUtil.setCellStyleProperties(A1, properties);
CellStyle style = A1.getCellStyle();
- assertEquals("fill pattern", FillPatternType.BRICKS, style.getFillPatternEnum());
+ assertEquals("fill pattern", FillPatternType.BRICKS, style.getFillPattern());
assertEquals("fill foreground color", IndexedColors.BLUE, IndexedColors.fromInt(style.getFillForegroundColor()));
assertEquals("fill background color", IndexedColors.RED, IndexedColors.fromInt(style.getFillBackgroundColor()));