Looking at a post by Karl Seguin where he show show designing for testability leads to a better design, in this case, composition over inheritance.
In the example, his CachedEmployeeLookup
has a dependency on an EmployeeLookup
, which both implement the same interface, IEmployeeLookup
How you would configure this in StructureMap so that the default class used by the program is CachedEmployeeLookup
whilst CachedEmployeeLookup
gets an EmployeeLookup
injected to it?