|
15 | 15 | */ |
16 | 16 | package org.dhatim.fastexcel; |
17 | 17 |
|
| 18 | +import org.apache.commons.io.output.NullOutputStream; |
| 19 | +import org.apache.poi.ss.usermodel.BorderStyle; |
| 20 | +import org.apache.poi.ss.usermodel.DataValidation.ErrorStyle; |
| 21 | +import org.apache.poi.ss.usermodel.DataValidationConstraint; |
| 22 | +import org.apache.poi.ss.usermodel.IndexedColors; |
| 23 | +import org.apache.poi.ss.usermodel.SheetVisibility; |
| 24 | +import org.apache.poi.ss.util.CellRangeAddress; |
| 25 | +import org.apache.poi.xssf.usermodel.XSSFDataValidation; |
| 26 | +import org.apache.poi.xssf.usermodel.XSSFRow; |
| 27 | +import org.apache.poi.xssf.usermodel.XSSFSheet; |
| 28 | +import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| 29 | +import org.junit.Test; |
| 30 | + |
18 | 31 | import java.io.ByteArrayInputStream; |
19 | 32 | import java.io.ByteArrayOutputStream; |
20 | 33 | import java.io.IOException; |
|
30 | 43 | import java.util.concurrent.ExecutionException; |
31 | 44 | import java.util.function.Consumer; |
32 | 45 |
|
33 | | -import org.apache.commons.io.output.NullOutputStream; |
34 | | -import org.apache.poi.ss.usermodel.BorderStyle; |
35 | | -import org.apache.poi.ss.usermodel.DataValidation.ErrorStyle; |
36 | | -import org.apache.poi.ss.usermodel.DataValidationConstraint; |
37 | | -import org.apache.poi.ss.usermodel.IndexedColors; |
38 | | -import org.apache.poi.ss.usermodel.SheetVisibility; |
39 | | -import org.apache.poi.ss.util.CellRangeAddress; |
40 | | -import org.apache.poi.xssf.usermodel.XSSFDataValidation; |
41 | | -import org.apache.poi.xssf.usermodel.XSSFRow; |
42 | | -import org.apache.poi.xssf.usermodel.XSSFSheet; |
43 | | -import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
44 | | -import org.junit.Test; |
45 | | - |
46 | 46 | import static org.assertj.core.api.Assertions.assertThat; |
47 | | -import static org.dhatim.fastexcel.SheetProtectionOption.DELETE_ROWS; |
48 | | -import static org.dhatim.fastexcel.SheetProtectionOption.OBJECTS; |
49 | | -import static org.dhatim.fastexcel.SheetProtectionOption.SHEET; |
| 47 | +import static org.dhatim.fastexcel.SheetProtectionOption.*; |
50 | 48 | import static org.junit.Assert.assertFalse; |
51 | 49 | import static org.junit.Assert.assertTrue; |
52 | 50 |
|
@@ -211,6 +209,8 @@ public void singleWorksheet() throws Exception { |
211 | 209 | ws.value(i, i++, intValue); |
212 | 210 | ws.value(i, i++, longValue); |
213 | 211 | ws.value(i, i++, bigDecimalValue); |
| 212 | + ws.value(i, i++, Boolean.TRUE); |
| 213 | + ws.value(i, i++, Boolean.FALSE); |
214 | 214 | try { |
215 | 215 | ws.finish(); |
216 | 216 | } catch (IOException ex) { |
@@ -240,6 +240,8 @@ public void singleWorksheet() throws Exception { |
240 | 240 | assertThat(xws.getRow(i).getCell(i++).getNumericCellValue()).isEqualTo(intValue); |
241 | 241 | assertThat(xws.getRow(i).getCell(i++).getNumericCellValue()).isEqualTo(longValue); |
242 | 242 | assertThat(new BigDecimal(xws.getRow(i).getCell(i++).getRawValue())).isEqualTo(bigDecimalValue); |
| 243 | + assertThat(xws.getRow(i).getCell(i++).getBooleanCellValue()).isTrue(); |
| 244 | + assertThat(xws.getRow(i).getCell(i++).getBooleanCellValue()).isFalse(); |
243 | 245 | } |
244 | 246 |
|
245 | 247 | @Test |
|
0 commit comments