Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.1-rc-1
-
None
-
None
Description
Following code works with 1.0 but fails with 1.1-rc1:
import groovy.mock.interceptor.MockFor
// ---------------------
class A
{
Object getFoo(Class _cl, int id)
}
def mocker = new MockFor(A.class)
mocker.demand.getFoo(1..2) { _class, _id ->
assertEquals 1, _id
}
mocker.use
{
def cntMgr = new A()
cntMgr.getFoo(String, 1)
}
// ---------------------
With 1.1.rc-1 it throws:
Exception thrown: groovy.lang.MissingMethodException: No signature of method: Script1.call() is applicable for argument types: ([Ljava.lang.Object values:
groovy.lang.MissingMethodException: No signature of method: Script1.call() is applicable for argument types: ([Ljava.lang.Object values: {[class java.lang.String, 1]}
at Script1$_run_closure2.doCall(Script1:20)
at Script1$_run_closure2.doCall(Script1)
at Script1.run(Script1:17)