diff options
author | Vladislav Galas <gallon@apache.org> | 2019-01-26 19:40:56 +0000 |
---|---|---|
committer | Vladislav Galas <gallon@apache.org> | 2019-01-26 19:40:56 +0000 |
commit | d60cb3a18c18b958998f066dc3591bc81dd85b3d (patch) | |
tree | 0b652762dc72de5b7efb4cb610ba200113eaa0c6 /src/testcases | |
parent | 1253a295710ed82680dd5153e868edd87a5a981d (diff) | |
download | poi-d60cb3a18c18b958998f066dc3591bc81dd85b3d.tar.gz poi-d60cb3a18c18b958998f066dc3591bc81dd85b3d.zip |
added Cell.setBlank() - as an alias, for now
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1852244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java index 9afa79f956..94a003dcb1 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java @@ -24,6 +24,9 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import static org.mockito.Mockito.doCallRealMethod; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -32,13 +35,11 @@ import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone; -import java.util.function.Consumer; import org.apache.poi.common.usermodel.HyperlinkType; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.ITestDataProvider; import org.apache.poi.ss.SpreadsheetVersion; -import org.apache.poi.ss.formula.FormulaParseException; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.util.LocaleUtil; import org.junit.Test; @@ -1357,6 +1358,16 @@ public abstract class BaseTestCell { assertTrue(cell.getBooleanCellValue()); } + @Test + public final void setBlank_delegatesTo_setCellType_BLANK() { + Cell cell = mock(CellBase.class); + doCallRealMethod().when(cell).setBlank(); + + cell.setBlank(); + + verify(cell).setCellType(CellType.BLANK); + } + private Cell getInstance() { return _testDataProvider.createWorkbook().createSheet().createRow(0).createCell(0); } |