The Singleton Pattern is one of the most widely used patterns from the Gang of Four (GoF) Desgin Patterns Book. One the reasons that it’s so widely used, I think, is because it’s also very easy to understand. The basic idea is that you control the creation of an object so that it will [...]
Archives for posts tagged ‘mock-objects’
Mocking .NET Objects with NUnit
Saturday, 10 March 2007
NUnit is my Unit Testing tool of choice for .NET development. Microsoft provides a unit testing framework but it only works with some higher-end versions of Visual Studio. They’re so similar that it’s almost ridiculous that Microsoft created their own version.
(See one of my previous posts for more information on Automating NUnit with MSBuild.) In [...]
jMock For Mocking Unit Tests
Sunday, 24 September 2006
Ok, so I might not exactly be on the cutting edge with this post, but I just started playing with jMock, a framework for creating Mock objects.
Mock objects are used to isolate various layers of an application by providing a fake implementation that will mimic the behavior of the real implementation but offers a deterministic [...]