Closed GoogleCodeExporter closed 8 years ago
Hi,
Spy cannot work around such design, internal calls are not intercepted in the
current implementation, only external interactions. And that would be probably
be a design issue. The code design should favor composition. In this snippet
if the second method is in a Collaborator with related responsibilities then
the code won't need Spies and the would just be ensuring invocations are made
to this mocked collaborator.
Generally speaking spies should be avoided in such cases to favor composition.
Original comment by brice.du...@gmail.com
on 25 Feb 2015 at 5:58
Original issue reported on code.google.com by
tabouf...@gmail.com
on 25 Feb 2015 at 5:40