MiniMock

Minimalistic approach to mocking in .NET

View on GitHub

Decision on Supporting Constructors

Context

In the MiniMock framework, there is a need to determine the scope of support for mocking constructors.

Decision

All constructors with the supported access level should be accessible. If no constructor exists, a parameterless constructor is created. A factory for each option should be created.

If only internal or private constructors exist, the class is not generated and a warning is registered.

Additionally, the framework should support the following:

Consequences

Positive:

Negative:


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