Session 1: Visual Studio 2012 Unit Testing using Fakes and Mocks
ITPro Today
June 10, 2013
Presented by: Brian Minisi
Running Time: 54 min
One of the basic tenets of unit testing is that the code you are testing should not have dependencies on other code. This guarantees that if a unit test fails, it is not caused by something other than the method under test. In the case when a method does depend on other code, you can use Fakes and Mocks to intercept calls to code outside of the method under test. This provides full control over your tests. In this session we’ll explore the use of Stubs and Shims using Microsoft Fakes. We’ll also look at how Mocks differ by enabling behavior verification using Moq.
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like