Can anyone tell me very clearly what\'s the main difference between a shim
and a stub
during unit testing?
I know about mock objects and I
From what I understood, the difference is where the mocked code resides or which part of code you mocked (i.e. the "where" gives the distinction). So I would put it as:
You call Stub the part of your code which you mocked while it will be called Shim if you mock some external call.
I found this reference good: My two cents on fakes, stubs, mocks, and shims esp the part "A general rule is to take advantage of stubs for internal calls and shims for external assemblies."