Dealing with dependencies is the most challenging aspect of test-driven development (TDD). Mocks and stubs are created to isolate the behavior we would like to test. The article “The Art of Mocking” is a good introduction on this topic. Creating all these testing classes by hand can lead to troubles: sometimes developers duplicate these classes and other times the mocks and stubs become more complicated than the code.
There are several open source tools to apply mocking principles in .NET. Tools like Rhino Mocks and Moq allow us to create mocks and stubs within our test method. These tools have a learning curve, but this video presents techniques that can ease you into these frameworks and help you automated your unit testing process.
More knowledge on .NET mocking framewroks:
* Mocking frameworks in .Net
* Why do we need yet another NET mocking framework
* Mocking Comparison – Part 1: The Basics
* Mocking Comparison – Part 2: Properties
* A quick comparison of some .NET mocking frameworks
* mocking-frameworks-compare is a set of test cases to compare different mocking frameworks available in .NET
Hi.
Very interesting introduction to mocking.
Do you know you can do mocking with a simpler syntax, without dependency injection?
I’ve developed Visual T#, a free programming language, specialized for Unit Testing that integrates mocking. All you need to know is operator $ usage!
Thanks to raising awareness on mocking.
Hey, great introduction to mocking!
For future videos please do something about the sound and video quality (stuttering) it pushed my patience to the limit :)