Closed GoogleCodeExporter closed 9 years ago
Original comment by julien.g...@gmail.com
on 11 Oct 2008 at 3:29
Fix in next release.
Original comment by JohnnyJianHY
on 12 Oct 2008 at 2:50
Original comment by JohnnyJianHY
on 12 Oct 2008 at 12:30
I am having a trouble while overloading the raises method like:
def raises(Throwable exception){
expectation.returnValue = new ReturnRaiseException(exception)
return this
}
def raises(Class exceptionClass, Object[] params) {
def exception = exceptionClass.metaClass.invokeConstructor(params)
return raises(exception)
}
but when I invoke the raises method like:
mockLoader.load("key").raises(IllegalArgumentException, "message")
it throws an exception:
groovy.lang.MissingMethodException: No signature of method:
org.gmock.ReturnMethodRecorder.raises() is applicable for argument types:
(java.lang.Class, java.lang.String) values: {class
java.lang.IllegalArgumentException, "message"}
Is it a bug of Groovy? Are there any solution?
Original comment by JohnnyJianHY
on 14 Oct 2008 at 5:08
OK, I found the problem: I just edited MethodRecorder instead of
ReturnMethodRecorder. I update ReturnMethodRecorder and the test is passed.
So, should we remove MethodRecorder? It seems ReturnMethodRecorder is renamed
from
MethodRecorder.
Original comment by JohnnyJianHY
on 14 Oct 2008 at 5:26
Yes you right MethodRecorder as been renamed to ReturnMethodRecorder. I am
suprised
it didn't get renamed for you when you updated your project.
It's already deleted/renamed:
http://code.google.com/p/gmock/source/browse/#svn/trunk/src/main/groovy/org/gmoc
k so
we shouldn't have to do anything.
Original comment by julien.g...@gmail.com
on 14 Oct 2008 at 6:53
So I was wrong the file wasn't renamed. Need to be cautious with google's
repository.
Original comment by julien.g...@gmail.com
on 14 Oct 2008 at 7:02
Original comment by JohnnyJianHY
on 14 Oct 2008 at 7:03
Original issue reported on code.google.com by
JohnnyJianHY
on 11 Oct 2008 at 3:07