MiniMock

Minimalistic approach to mocking in .NET

View on GitHub

Mocking Protected Methods

Context

In our mocking framework, there is a consideration to support mocking protected methods. Protected methods are often used in base classes to provide functionality that is intended to be used by derived classes. Supporting the mocking of protected methods can enhance the flexibility and comprehensiveness of our testing framework.

Decision

We will support the mocking of protected methods in our mocking framework. This will allow developers to create more thorough and flexible tests by enabling them to mock and verify the behavior of protected methods.

Consequences

Positive:

Negative:


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