This is another in my 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, I wrap up a 3 part series on unit testing. I show 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. I then show 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