junit测试中方法不运行问题所在
2009-07-29 01:04
369 查看
@Test后面的方法如果带有参数就会出现如题错误,即
@Test
public void addCustom(int a){
Custom c=new Custom();
c.setCcustomname("老羊公司");
c.setCfactoryaddress("邯郸某街");
c.setCphone("13838389438");
c.setCprincipal("爷");
c.setCsendaddress("老杨家");
Employee e=new Employee();
e.setEid(1);
c.setEmployee(e);
cd.addCustom(c);
}
需要把方法中的参数int a 去掉才能运行
@Test
public void addCustom(int a){
Custom c=new Custom();
c.setCcustomname("老羊公司");
c.setCfactoryaddress("邯郸某街");
c.setCphone("13838389438");
c.setCprincipal("爷");
c.setCsendaddress("老杨家");
Employee e=new Employee();
e.setEid(1);
c.setEmployee(e);
cd.addCustom(c);
}
需要把方法中的参数int a 去掉才能运行
相关文章推荐
- Junit 实例精讲基础教程(五) JUnit套件测试,一次性运行多个测试用例(测试类的测试方法)
- junit测试和main方法测试线程问题
- 运行junitreport出的问题解决方法
- junit测试和main方法多线程中遇到的问题
- 记一个使用Junit测试中的问题:The import junit cannot be resolved解决方法
- 解决Eclipse项目中有sql-map-config.xml文件但是运行Junit测试ibatis时提示找不到该文件的一种方法
- JUnit无法运行测试方法的记录
- JUNIT测试Hibernate和Spring的Dao层方法出现的问题
- JUnit——运行多个测试方法
- his测试 junit原来不能用的问题解决方法 及 eclipse开发加速小技巧 (from victor)
- JAVAEE-junit测试hibernate里的方法(hibernate交给spring管理)的问题
- junit中出现所有方法都一起运行的问题
- 命令行下运行Junit,多个类、单个类或者单个测试方法
- Spring注解编程时用junit测试时,显示jdK版本过低问题,更改版本后仍然不行的解决方法
- Junit测试含有‘启动新线程’这一操作的方法时瞬间结束的问题
- CETK测试原理/测试方法/测试结果分析以及常见WinCE Test Kit运行问题的排查
- 基于JUnit和Ant测试程序正在运行使用Kieker(AspectJ)监测方法
- Junit指定运行的测试方法
- 关于Hibernate 在Junit测试中可以成功但是在Web下却无法运行的处理方法