红联Linux门户
Linux帮助

JUnit 4.11发布,Java单元测试框架

发布时间:2012-11-16 11:06:05来源:红联作者:empast
JUnit 4.11 发布,该版本升级 Hamcrest 到 1.3 版本,改进了 assertThat ,例如:

assertThat(Long.valueOf(1), instanceOf(Integer.class));

原来的报错信息是:

Expected: an instance of java.lang.Integer
got: <1L>

新的报错信息:

Expected: an instance of java.lang.Integer
but: <1L> is a java.lang.Long

另外的改进内容还包括参数化测试、测试执行的顺序、Maven、规则等方面,详情请看这里。

主页:http://www.junit.org/

下载:https://github.com/KentBeck/junit

来自:开源中国社区
文章评论

共有 0 条评论