GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Sometimes I need only a stub, but I have to use getMock(). This has two disadvantages. a) the reader may think that the tests uses the stub to verify something and (confusing) b) each stub will add up to the assert count (wrong).
addStub() will cure these issues.
You're right on the assertion count (not know what increases it), but the Test Double implementation is unique, so you can could build a mock with an object obtained via getStub() and a stub with an object obtained via getMock(). Maybe a getDouble() or getTestDouble() would be more clear?
Most of the work here would be doing all the needed doc updates and I don't really care and know enough to properly word this
Closing this in favor of #550 which is a bit more detailed.