December 2010 Developer Dinner: How to Simplify Unit Testing with Pex and Moles - Per Diem App [Videos]

Marc Schweigert presents on his Per Diem App at the December 2010 Developer Dinner.Microsoft Research has produced two tools to dramatically simplify the construction of unit tests. We'll look at Moles, a framework and Visual Studio add-in that helps to isolate your code from external dependencies.With Moles you can replace any .Net method with a […]

Marc Schweigert presents on his Per Diem App at the December 2010 Developer Dinner.

Microsoft Research has produced two tools to dramatically simplify the construction of unit tests. We'll look at Moles, a framework and Visual Studio add-in that helps to isolate your code from external dependencies.

With Moles you can replace any .Net method with a delegate. Next we'll examine Pex, a VS add-in that automatically generates unit tests for you. Pex analyzes your code, looking at, for example, if statements, assertions and operations that throw exceptions, to create inputs that try to achieve 100% code coverage.