The Joy of Moq - Partial Mocks

Continuing to extol the virtues of Moq, in this post we will explore how to do partial mocking in situations where we are testing a class that calls one or more of its own methods.   The Class Diagram Below is the mocked (never gets old) up class that we will be testing. public class [...]

 
The Joy of Moq - Multiple Interfaces

A few weeks ago I wrote about how my team has been making the switch to Moq over NMock; since then, we really haven’t looked back. Recently I had cause to use a couple of Moq’s features that reinforced the decision to make the switch: partial mocking, and mocking an object that implements multiple interfaces. [...]

 
Yet Another .NET Mocking Framework

That’s right, yet another .NET mocking framework. Given that my team is making the transition from NMock to Moq for a variety of reasons, I most definitely wasn’t looking for another such framework. Then I read one of Roy Osherove’s tweets: Pretty compelling statement coming from Roy, and in light of my recent conversion to [...]

 
Mocking in .NET - Moving From NMock to Moq

Recently I came across NMock3, which improved upon NMock2 by providing for strongly-typed expectations on any mock objects you might create. I stumbled across this while reading this post comparing different mocking frameworks. In this same post however, one of the original contributors to NMock2 gave a compelling reason why he switched to Moq. This [...]

© 2011 Musings of the Bare Bones Coder Suffusion theme by Sayontan Sinha