Mocking .NET Without Hurting Its Feelings

This page is for a talk I'm presenting at various technical conferences and groups. If you've attended the talk, please give me feedback using the "[Feedback]" links next to each time I've givin the talk.

Session Abstract:

Unit testing has become an accepted part of our lives as .NET programmers. To help focus our tests to only the code we want to validate, Mocking Frameworks are a powerful tool in our toolbox. Like many tools, if you have an understanding of how the tool works under the hood, you can bend it to your will (and also know where it'll break if you bend too much).

In this session, you'll learn about the two main types of mocking frameworks: constrained frameworks (like RhinoMocks and Moq) and unconstrained frameworks (such as Typemock Isolator and Telerik JustMock). I'll dig into how the two actually do their magic and we'll discuss the pros, cons, and limits of both. We'll look at examples of how to use the frameworks in your tests, mocking out dependencies from your own code and even third-party logic.

You'll get the most out of this session if you're comfortable reading C# code and have a general understanding of class inheritance in .NET, along with some experience writing and running unit tests. Prior experience using mocking frameworks is not necessary.

Related Pages:



Upcoming Presentations:

JAN 9-12, 2018

Presented At:

OCT 13, 2017

SEPT 9, 2017

Recent Version of Slides: