【发布时间】:2015-10-13 09:11:20
【问题描述】:
class Test{
private Boolean isChange;
}
Assume that tests list contains 1000 objets.
List<Test> tests = new ArrayList<Test>();
Test t = new Test();
t.setIschange(true);
tests.add(t);
就像我添加了 200 个对象为真,即 isChanges 值,其余的都是假的 1000 个;它会变成 300 个赞。
那么如何使用assertJ检查列表是否包含200个对象isChange值是否为真
【问题讨论】:
标签: java junit4 spring-junit assertj