MiniMock

Minimalistic approach to mocking in .NET

View on GitHub

Decision on Supporting Events

Context

In the MiniMock framework, there is a need to determine the scope of support for mocking events. Events are a crucial part of the C# language, enabling the publisher-subscriber pattern. Supporting all types of events is essential to ensure the framework’s flexibility and usability.

Decision

The MiniMock framework will support mocking all types of events. This includes standard events, custom events, and events with different delegate types. This decision ensures that the framework can handle a wide range of scenarios involving event handling.

Events must be mockable using the following parameters:

Consequences

Positive:

Negative:


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