MiniMock

Minimalistic approach to mocking in .NET

View on GitHub

Decision on How Strict the Framework Should Be

Context

In the MiniMock framework, there is a need to determine the level of strictness when handling calls to members that are not explicitly mocked. A strict framework can help catch unintended calls and ensure that tests are precise and reliable. However, events are a special case and should not require listeners when they are called.

Decision

The framework will be strict, throwing exceptions when a member that is not mocked is called. This approach ensures that all interactions are explicitly defined and helps catch unintended calls. However, events will be treated as a special case and will not require listeners when they are called.

Consequences

Positive:

Negative:


More ADRs can be found in the docs/ADR directory.