Give preference to Stub types. Using a stub type helps you adhere to sound architecture principles, when writing new code and/or using Test Driven Development (TDD).
09 November 2011
What Are Mole and Stub Types?
at
06:51
Moles generates two types, in the Moles assemblies: Mole types and Stub types. Both behave very much the same, but are are used in mutually exclusive situations. See page 3 of the Moles Reference Manual, for more information on stub and mole types.
An important concept often overlooked by developers investigating the Moles Framework is that the mole and Stub types may be configured with frequently-used detours, in a private, parameterized test class method. This allows you to centralize the setting of frequently-used values, and therefore adhering to the DRY principle.
02 November 2011
How Do Moles Detours Work?
at
19:25
Moles is a dependency isolation and mocking framework. Instead of building mock stubs for dependency injection, Moles allows the programmer to detour the call to portions of the actual dependency object. So, how does Moles detour calls, without touching the source code?
What is a Call Detour?
at
19:05
Subscribe to:
Posts (Atom)