Injecting Typemock Stubs and Mocks using the StructureMap container in a unit test
Posted by: ISerializable,
on 24 Apr 2008 |
View original | Bookmarked: 0 time(s)
Someone asked for examples of how you'd inject stubs and mocks when you'd like your object under test to use a container such as StructureMap. here are a couple of simple tests to show this using Typemock Isolator. the first uses the string based mocks found in the free community version of Typemock Isolator. the second uses the natural style syntax in the enterprise edition: assume you have ILogger, IEmailer interfaces and a MessageManager class under test that takes both of these in the ctor....