Mocks and StubsTest Doubles with and without Rhino Mocks
About all this mocking baloney?
Why do I care
No External Dependencies◦ No Database◦ No Network◦ No Registry◦ No context-dependent information (config files,
etc.) Goal: 100-500/sec BUT…what about internal dependencies?
The “Unit” in Unit Test
Code time!
Inside-Out
Real-World Testing Strategies
Outside-In
Real-World Testing Strategies
Note on tools
Leave no code behind! Can we control it? If not, STUB TIME!!!
A Closer Look – Indirect Inputs
Do I care if you’re called? Leave no requirement behind! Favor doubles over the real deal
A Closer Look – Indirect Outputs
Rhino Mocks - http://www.ayende.com/projects/rhino-mocks.aspx
Moq - http://code.google.com/p/moq/ xUnit Test Patterns - http://xunitpatterns.com/ Me
◦ http://jimmybogard.lostechies.com◦ http://feeds.feedburner.com/GrabBagOfT◦ http://www.lostechies.com◦ http://feeds.feedburner.com/LosTechies◦ http://twitter.com/jbogard
Links et. al.