Let’s define dynamic fake objects and how they’re different from regular, handwritten fakes.
A dynamic fake object is any stub or mock that’s created at runtime without needing to use a handwritten (hardcoded) implementation of that object.
Using dynamic fakes removes the need to hand-code classes that implement interfaces or derive from other classes, because the needed classes can be generated for the developer at runtime, in memory, and with a few simple lines of code.
Next, we’ll look at NSubstitute and see how it can help you overcome some of the problems just discussed.
In this chapter, I’ll use NSubstitute (http://nsubstitute.github.com/ ...