9
shouts

To mock or not to mock, that is the question – Part 1 - Gabriel Schenker - DotNetSlackers.com

published 330 days, 7 hours, 52 minutes ago posted by JosephJoseph 331 days, 6 hours, 35 minutes ago
Tuesday, April 21, 2009 7:28:30 PM GMT Monday, April 20, 2009 8:45:49 PM GMT

This article gives a quick introduction in the usage of two of the most known mocking frameworks: Rhino Mocks and Moq.

When using TDD [1] to develop an application it is essential that the system under test (SUT) can be tested in isolation. That is, only the class that I am currently developing is “real” and all other parts are simulated or faked. If my SUT needs to collaborate with other components those other components are mocked during the test. We can either manually implement such mock objects or use a mocking framework for this task. There exist several well known mocking frameworks for the .NET platform. In this article I’ll give a short introduction in the two most used OSS mocking frameworks. The first is Rhino Mocks [2] which was developed by Oren Eini, aka Ayende [3] and the other one is Moq [4] developed by Daniel Cazzulino [5].

category: Architecture | clicked: 18 | | source: dotnetslackers.com | show counter code
tags: Moq, Rhino Mocks