【发布时间】:2019-12-31 07:51:00
【问题描述】:
我想使用 EasyMock 测试方法“make()”。在方法内部有一个使用参数创建的新对象。我想知道,如何使用 EasyMock 编写相同的测试用例?
private void make(final Parent p) {
fun = new Fun(getMethod1(), getMethod2(), getMethod3(), getMethod4());
fun.setBorder(120);
p.add(fun);
}
private ProductSpecification getMethod1() {
return getSequence();
}
//XYZ.class
@Override
public T getSequence() {
return this.sequence;
}
public View getMethod2() {
return view;
}
public Info getMethod3() {
return this.info;
}
任何帮助将不胜感激。 谢谢。
【问题讨论】:
标签: easymock