【发布时间】:2011-02-09 15:56:25
【问题描述】:
public Object doSomething(Object o); 我想模拟。它应该只返回它的参数。我试过了:
Capture<Object> copyCaptcher = new Capture<Object>();
expect(mock.doSomething(capture(copyCaptcher)))
.andReturn(copyCatcher.getValue());
但没有成功,我只得到一个 AssertionError java.lang.AssertionError: Nothing captured yet。有什么想法吗?
【问题讨论】:
标签: java mocking capture easymock