mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-04 20:58:00 +08:00
修改测试代码
This commit is contained in:
parent
1b6a27aa89
commit
c36bc18937
@ -5,6 +5,9 @@ import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ExcelUtilTest {
|
||||
|
||||
@Test
|
||||
@ -47,9 +50,14 @@ public class ExcelUtilTest {
|
||||
@Test
|
||||
@Ignore
|
||||
public void readAndWriteTest() {
|
||||
ExcelReader reader = ExcelUtil.getReader("d:\\test/select.xls");
|
||||
ExcelWriter writer = reader.getWriter();
|
||||
String filepath = "d:\\test/select.xls";
|
||||
ExcelWriter writer = ExcelUtil.getWriter(filepath);
|
||||
writer.writeCellValue(1, 2, "设置值");
|
||||
writer.close();
|
||||
ExcelReader reader = ExcelUtil.getReader(filepath);
|
||||
List<Map<String, Object>> map = reader.readAll();
|
||||
reader.close();
|
||||
Assert.assertNotNull(map);
|
||||
Assert.assertFalse(map.isEmpty());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user