【发布时间】:2019-11-18 11:46:31
【问题描述】:
我想只使用 EasyMock 为 filter = new Simple(A.ATTRIBUTE_ACTIVE, Operator.EQUALS, Boolean.TRUE); 行编写期望语句。
//SingleLimit.java
private Limitation filter;
protected final Limitation getBaseLimitation() {
Validate.notNull(type);
GroupClass Group = new GroupClass(GroupTypeClass.SELECTOR);
if (Activatable.class.isAssignableFrom(typeListed)) {
if (A.class.isAssignableFrom(type)) {
//expect statement for below line
filter = new Simple(A.ATTRIBUTE_ACTIVE, Operator.EQUALS, Boolean.TRUE);
}
}
}
//Simple.java
public class Simple implements Serializable, Limitation
{
public Simple(String path, Operator operator, Object value) {
this(path, operator, new Object[]{value});
}
}
任何帮助将不胜感激
【问题讨论】:
标签: new-operator easymock