1
我的模仿对象有这个方法我想验证被称为:Mockito如何匹配String [] []参数?
void postResource(String url, int x, String[][] headers)
如何使用any()
方法来验证是否postResource
与任何headers
参数叫什么名字?
http = mock(Http.class);
verify(http, never()).postResource(anyString, anyInt(), ?)
更妙的是,有没有办法用任何参数组合来验证方法?像
verify(http, never()).postResource(anyArguments)
是的,它的工作,谢谢! – Popcorn