When testing, it is sometimes useful to use a test double to manipulate or verify the behaviour of the system under test. The doubles are passed or injected into the class or method under test instead of instances of production code.
Guide unit testing in Visual Studio for C#
Using a mocking framework as a stub
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0