与JMock一起使用with(any(Class.class)))
||
使用JMock:
context.checking(new Expectations() {{
// Other oneOf() will() statements ...
oneOf(shopAccount).enter(100, with(any(String.class)));
will(returnValue(true));
// Other oneOf() will() statements ...
}});
执行期间将引发以下异常:
java.lang.IllegalArgumentException:并非所有参数都被赋予显式匹配器:要么必须由匹配器指定所有参数,要么必须由值指定所有参数,则不能混合匹配器和值。
为什么我不能这样做?使用with(any(Klass.class))
?
没有找到相关结果
已邀请:
1 个回复
瞧叮