Getting Started with Unit Testing Part 3
- Posted: Jun 18, 2014 at 8:51AM
- 42,021 views
- 7 comments
Loading user information from Channel 9
Something went wrong getting user information from Channel 9
Loading user information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
This is another in Robert's Getting Started series, where he provides an introduction to a topic that everyone knows about but not everyone is actually doing (or doing enough of). In this episode, Robert wraps up his 3 part series on unit testing. He shows how to use Microsoft Fakes, which enable you to replace a method call with a stub or shim in your unit tests. For example, you can declare, for the purpose of running a unit test, that a call to a random number generator always return 6 or that a call to the Save method of a service always returns true. That way, you can test the rest of the code in that unit. Robert then shows how to configure continuous integration with Visual Studio Online. Once you do that, all of your unit tests will be run every time you check in code.
You can find the sample code and demo scripts for the entire 3 part series here.
Previously on Visual Studio Toolbox