摘要:
如果需要是用assertThat需要在项目中引入junit4的jar包.(匹配器和断言方法在junit4的jar包中都能找到,引入就可以了)下面是常用断言的代码 1 import static org.hamcrest.MatcherAssert.*; 2 import static org.ham... 阅读全文
posted @ 2015-11-15 18:50
飘飘雪
阅读(18171)
评论(0)
推荐(2)
摘要:
junit中的assert方法全部放在Assert类中,总结一下junit类中assert方法的分类。1.assertTrue/False([String message,]boolean condition); 判断一个条件是true还是false。感觉这个最好用了,不用记下来那么多的方法名。2.... 阅读全文
posted @ 2015-11-15 17:54
飘飘雪
阅读(1062)
评论(0)
推荐(0)

浙公网安备 33010602011771号