【发布时间】:2014-10-13 19:50:40
【问题描述】:
我有一个接受 3 个参数的模拟服务。如何访问第二个参数?
mockedService.invoke(arg1, arg2, arg3) answers {
(params, mock) => {
//Do something with params.arg2 to the value that is returned from the invocation
}
}
在文档中,他们声明“方法参数的数组将被传递”我如何访问第二个参数(在这种情况下为arg2)?我是否将params 与List[Any] 一起投射?
谢谢
【问题讨论】:
标签: scala unit-testing mockito matcher specs2