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
As a general guide, use stubs for calls within your Visual Studio solution, and shims for calls to other referenced assemblies. This is because within your own solution it is good practice to decouple the components by defining interfaces in the way that stubbing requires. But external assemblies such as System.dll typically are not provided with separate interface definitions, so you must use shims instead.
It's very good reference.