Mocking .NET Without Hurting Its Feelings

Details

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.

Speaker: John M. Wright

John M. Wright has been a professional software developer for about 19 years, gaining experience ranging from "shrink-wrapped" software to large, distributed networks using multiple platforms and technologies. His experience spans the entire software lifecycle and though he has experience in a management role, his passion lives in writing high-quality, clean code while providing leadership through technical direction and mentorship.

He enjoys sharing his experiences with automated testing, mocking frameworks, and static analysis tools, or guiding other developers through the darker crevices of the .NET framework, while also learning from his peers' experiences-- helping everyone "level up" as a team. He has a pragmatic approach to and a heavy interest in continuous improvement of people, process, and product. He's currently applying that experience as a Senior Software Developer at Stack Overflow on the Talent product team.

For over a decade, he's lived in the western suburbs of Chicago, Illinois, where he enjoy spending time with his wife and teenage son. Before that, he grew up in Castroville, Texas, a small town in the middle of corn fields and cattle ranches to the west of San Antonio, Texas. He spent his college years at Southwest Texas State University in San Marcos, Texas, where he earned a Bachelor of Science in Computer Science degree and flirted with a Psychology dual-major before realizing he didn't want to pay for that extra time in school. He lived in the Austin, Texas area for about a decade before moving north to escape the Texas heat.