我在 java 上下文中并且正在使用 Mockito(但我没有绑定到它)来满足基本的模拟需求。
我有这样的代码
public class AuditInfoSerializer {
[..]
public Map<String, Object> doStuff(Object a) {
doOtherStuff("hello", new TempClass(someField, <someParams>));
doOtherStuff("world", new TempClass(someField, <otherParams>));
return getResult();
}
}
并且在测试中,我想验证TempClass在调用该doStuff方法时是否有两个使用正确参数集创建的实例。
这有可能吗?
qq_笑_17
一只名叫tom的猫
随时随地看视频慕课网APP
相关分类