Moq - Object mocking framework

This project evolved out of a simple need: how can we make our software more malleable and easier to change in the field?

In humanitarian and aid scenarios, it is common to suddenly realize that the requirements a piece of software was built to are exceeded by the situation. Adding new functionality and changing some behaviour may become critical in order to be able to deploy or integrate existing systems.

One big problem with this is that software tends to be very brittle- changing or fixing something puts at risk breaking other things. This can be made more predictable through good design and architecture practices, of course. A good design practice is to build software around automated tests (a practice called Test Driven Development - TDD). When doing TDD, a developer builds automated tests as an integral part of the development process - even before the actual code that would make those tests pass gets written. Later on functionality is added or changed, it is easy to re-run these tests and see what was broken in the process, and revise the requirements, tests, or the actual project code to accomodate the changes.

When changing the software it is important that these tests become easy to read and understand, especially if the developer is under pressure. The Moq project evolved out of efforts on how we can make tests easier to read - especially when building 'Mock' objects (objects that 'pretend' to behave like a larger, more complex part of the system, that can be abstracted for the needs of a particular test). Using mock objects helps to isolate tests on a target object from a larger, more complicated context, and helps your objects be less coupled, which improves the design of the overall system.

Specifically - Moq can be used by developers on the .NET platform to specify the behaviour of mock objects used in testing. It's called Moq because it is based on the LINQ technology available in .NET.

Developers:

This project is a joint effort of InSTEDD, Clarius and Manas

Current Status: 
Moq is released. It evolved out of what were doing in our own unit tests and it is being actively used in Twitter Bots and Contacts Nearby.