From 715a5e239e4b7ce456f56cf674607cbd54674d4f Mon Sep 17 00:00:00 2001 From: Looly Date: Wed, 29 May 2024 22:09:31 +0800 Subject: [PATCH] fix test --- .../src/test/java/cn/hutool/poi/excel/WriteStyleTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hutool-poi/src/test/java/cn/hutool/poi/excel/WriteStyleTest.java b/hutool-poi/src/test/java/cn/hutool/poi/excel/WriteStyleTest.java index eba2ca4c6..192de0273 100644 --- a/hutool-poi/src/test/java/cn/hutool/poi/excel/WriteStyleTest.java +++ b/hutool-poi/src/test/java/cn/hutool/poi/excel/WriteStyleTest.java @@ -2,7 +2,9 @@ package cn.hutool.poi.excel; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; +import cn.hutool.poi.excel.cell.CellSetter; import cn.hutool.poi.excel.style.StyleUtil; +import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.Font; import org.junit.Ignore; @@ -32,6 +34,11 @@ public class WriteStyleTest { writer.write(rows); + writer.writeCellValue(0, 0, (CellSetter) cell -> { + cell.setCellStyle(cellStyle); + cell.setCellValue("1234"); + }); + for (int i = 0; i < writer.getRowCount(); i++) { writer.setStyle(cellStyle, 2, i); }