diff options
author | Javen O'Neal <onealj@apache.org> | 2015-11-24 07:34:09 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2015-11-24 07:34:09 +0000 |
commit | be77875e207b637bf791bf69bd70f4d0be35ae3c (patch) | |
tree | 6831ce72f9bc2a8a1611dbd053e7f91dfd19c8ff /src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java | |
parent | 6c7a9314db4ca98068e8f557f046a487a1fd4512 (diff) | |
download | poi-be77875e207b637bf791bf69bd70f4d0be35ae3c.tar.gz poi-be77875e207b637bf791bf69bd70f4d0be35ae3c.zip |
bug 58642: remove deprecated functions in Spreadsheet Sheet interface and implementing classes; add @Override annotations
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1716046 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java index c60823ee8e..c7298fda21 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java @@ -128,7 +128,6 @@ public final class TestHSSFSheet extends BaseTestSheet { /** * Test vertically centered output. */ - @SuppressWarnings("deprecation") @Test public void verticallyCenter() throws IOException { HSSFWorkbook wb = new HSSFWorkbook(); @@ -136,12 +135,10 @@ public final class TestHSSFSheet extends BaseTestSheet { VCenterRecord record = s.getSheet().getPageSettings().getVCenter(); assertFalse(record.getVCenter()); - assertFalse(s.getVerticallyCenter(true)); - assertFalse(s.getVerticallyCenter(false)); + assertFalse(s.getVerticallyCenter()); s.setVerticallyCenter(true); assertTrue(record.getVCenter()); - assertTrue(s.getVerticallyCenter(true)); - assertTrue(s.getVerticallyCenter(false)); + assertTrue(s.getVerticallyCenter()); wb.close(); } @@ -156,8 +153,11 @@ public final class TestHSSFSheet extends BaseTestSheet { HCenterRecord record = s.getSheet().getPageSettings().getHCenter(); assertFalse(record.getHCenter()); + assertFalse(s.getHorizontallyCenter()); s.setHorizontallyCenter(true); assertTrue(record.getHCenter()); + assertTrue(s.getHorizontallyCenter()); + wb.close(); } @@ -650,7 +650,6 @@ public final class TestHSSFSheet extends BaseTestSheet { wb2.close(); } - @SuppressWarnings("deprecation") @Test public void autoSizeColumn() throws IOException { HSSFWorkbook wb1 = HSSFTestDataSamples.openSampleWorkbook("43902.xls"); @@ -675,7 +674,7 @@ public final class TestHSSFSheet extends BaseTestSheet { //create a region over the 2nd row and auto size the first column sheet.addMergedRegion(new CellRangeAddress(1,1,0,1)); - assertNotNull(sheet.getMergedRegionAt(0)); + assertNotNull(sheet.getMergedRegion(0)); sheet.autoSizeColumn((short)0); HSSFWorkbook wb2 = HSSFTestDataSamples.writeOutAndReadBack(wb1); |