story#YWHJT-zancun

This commit is contained in:
彭宇琦 2020-02-29 19:35:17 +08:00
parent 163e40110d
commit 6795590eae
2 changed files with 1 additions and 52 deletions

View File

@ -749,7 +749,7 @@ public class ZentaoTemplet {
for (int i = 0; i < sheetList.size(); i++) {
// 获取标签的name属性并将该属性值作为sheet的名称
XSSFSheet xs = xw.createSheet(((Element) (sheetList.get(i))).attributeValue("name"));
// 获取sheet标签下的所有column标签
List<?> columnList = ((Element) (sheetList.get(i))).elements("column");
// 创建第一行用于编写表头

View File

@ -1,51 +0,0 @@
package pres.auxiliary.testcase.templet;
import org.junit.BeforeClass;
import org.junit.Test;
import pres.auxiliary.directory.exception.IncorrectDirectoryException;
import pres.auxiliary.work.testcase.templet.ZentaoTemplet;
public class TestZentaoTemplet {
@BeforeClass
public static void setPath() {
ZentaoTemplet.setSavePath("E:\\Test\\");
ZentaoTemplet.setFileName("测试用例测试");
try {
ZentaoTemplet.create();
} catch( IncorrectDirectoryException e ) {
}
}
@Test
public void test1() {
try {
ZentaoTemplet.create();
System.out.println("test1-------未抛出异常");
} catch( IncorrectDirectoryException e ) {
System.out.println("test1-------抛出异常");
}
}
@Test
public void test2() {
ZentaoTemplet.setCoverFile(false);
try {
ZentaoTemplet.create();
System.out.println("test2-------未抛出异常");
} catch( IncorrectDirectoryException e ) {
System.out.println("test2-------抛出异常");
}
}
@Test
public void test3() {
ZentaoTemplet.setCoverFile(true);
try {
ZentaoTemplet.create();
System.out.println("test3-------未抛出异常");
} catch( IncorrectDirectoryException e ) {
System.out.println("test3-------抛出异常");
}
}
}