Categories: Testing
Latest version: 2.0 Release Candidate 1Added 2003-05-21Updated 2007-10-31
Dynamic mock-object library for .NET.Its purpose is to provide an API for rapidly creating mock implementations of custom objects and verifying that objects interact with them correctly from unit tests.Features include:- expectations are specified beforehand and verified on the fly as the code under test is being executed, rather than afterwards using assertions. This has the advantage that mocks fail fast, allowing you to easily pinpoint the exact point the test failed, using a stack trace or debugger.- mock implementations of interfaces are generated on the fly at runtime, which avoids having to add a code generation step to the build.- error messages show the reason for the failure.- flexible expectations can be built up using the constraint library.The original NMock was a .NET port of the Java-based DynaMock, whereas NMock 2.0 is inspired by the newer jMock library.