Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Getting Started with Unit Testing Part 3

Download

Right click “Save as…”

  • MP3 (Audio only)
  • MP4 (iPhone, Android)
  • High Quality MP4 (iPad, PC, Xbox)
  • Mid Quality MP4 (Windows Phone, HTML5, iPhone)

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

Tags:

Follow the Discussion

Remove this comment

Remove this thread

close

Comment on the Post

Already have a Channel 9 account? Please sign in