Test class should have exactly one public constructor解决办法
来源:互联网 发布:java超市账单管理系统 编辑:程序博客网 时间:2024/06/08 09:01
Test class should have exactly one public constructor解决办法
今天配置重新配置hudson,跑单测统计覆盖率的时候,一堆用jmockit的单测方法都失败了,并且都报错:
Error MessageTest class should have exactly one public constructorStacktracejava.lang.Exception: Test class should have exactly one public constructorat java.lang.reflect.Constructor.newInstance(Constructor.java:513)
后面这个$很奇怪,像是内部类的样子,后来在网上查了一下,果然是。因为我在ant脚本里面配置需要跑的单测包含:
<batchtest todir="report/junitReport" haltonfailure="no"> <fileset dir="${testsrcbin.dir}"> <include name="com/baidu/rigel/sp/pangu/**/*Test*.class"/> </fileset></batchtest>**/*Test*.java,就包含了子类,所以应该再添加一句:
<include name="com/baidu/rigel/sp/pangu/**/*Test*.class"/> <exclude name="com/baidu/rigel/sp/pangu/**/*$*.class"/>其实最好还是使用
<include name="com/baidu/rigel/sp/pangu/**/*Test.class"/>就是以Test结尾,是标准的。
- Test class should have exactly one public constructor解决办法
- java.lang.Exception: Test class should have exactly one public constructor
- Test class should have public zero-argument constructor 解决办法
- Check failed: net_->num_inputs() == 1 (0 vs. 1) Network should have exactly one input.
- Error: This class should provide a default constructor (a public constructor with no arguments)
- 关于make sure class name exists, is public, and has an empty constructor that is public解决办法
- Error:Error: This fragment should provide a default constructor (a public constructor打包apk错误
- This fragment should provide a default constructor (a public constructor with no arguments
- Why you should use Test::Class
- Exactly one month ago
- Component template should contain exactly one root element. If you are using v-if on multiple elemen
- An Activity with a client event should at least have one destination
- Class constructor
- How Class.forName works exactly?
- Entities exposed by DomainService operations must have at least one public property marked with the
- one-to-one with composite-id must have common CompositeId class
- Unable to instantiate fragment make sure class name exists, is public, and has an empty constructor
- Unable to instantiate fragment make sure class name exists, is public, and has an empty constructor
- oracle中sequence序列的使用
- Android开发之设置断点单步调试
- RoundcornerForm 圆角窗口
- java ee 面试题 总结
- dedeCMS安装
- Test class should have exactly one public constructor解决办法
- 引用类型和const类型的成员变量
- WebStorm:令人眼前一亮的一款前端开发IDE
- 在iOS开发中使用FMDB
- ORACLE修改表空间方法
- oracl 数据库中查询当前时间前几天的数据
- Ajax实现原理
- 第十二周 C# 试验 《 4 》
- 关于jfreechart开发问题 首先查看 jar包里的demo不显示问题