TA的每日心情 | 慵懒 2017-7-10 17:29 |
---|
签到天数: 136 天 连续签到: 1 天 [LV.7]测试师长
|
ExcelDataProvider类:
public class ExcelDataProvider implements Iterator<Object[]> {
private Workbook book = null;
private Sheet sheet = null;
private int rowNum = 0;
private int currentRowNo = 0;
private int columnNum = 0;
private String[] columnnName;
public ExcelDataProvider(String classname, String methodname) {
try {
int dotNum = classname.indexOf(".");
if (dotNum > 0) {
classname = classname.substring(classname.lastIndexOf(".") + 1,
classname.length());
}
测试Login类:
public class Login {
public static void jd_login(String Erroruser, String ErrorPwd, String RightUser, String RightPwd, String AliasUser) throws InterruptedException {
// TODO Auto-generated method stub
String classname = "Login";
String methodname = "jd_login";
Iterator<Object[]> exceldata = new ExcelDataProvider();
exceldata.ExcelDataProvider(classname, methodname);
最后这句报错,提示The method ExcelDataProvider(String,String) is undefined for type Iterator<Object[]>,请问这里该怎么写? |
|