Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.4
-
Fix Version/s: None
-
Component/s: mocks and stubs
-
Environment:Windows 7 64-bit, groovy 1.8.4
-
Testcase included:yes
-
Number of attachments :
Description
Using a half mock, the expected result is that only ignored methods should be executed from the original code and demanded methods should be replaced by the given closure. Actually, in version 1.8.4, the demanded methods are also executed from the original code (see attached unit test).
Yes, just confirming that currently (and I believe at least since 1.7) the demand behavior is such that calls from outside the object, e.g. aGroovyClass.anotherMethod() in your example are checked but not internal method calls from other methods in the object - which is only a problem with half-mocks - but nonetheless a problem worth exploring.