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].
No comments yet, be the first one to post comment.