MiniMock

Minimalistic approach to mocking in .NET

View on GitHub

Matching Target API in Mock API

When creating a mocking class, the mock API must closely mirror the API of the target being mocked. This ensures that the mock can be used as a drop-in replacement for the target, facilitating seamless testing and reducing the learning curve for developers.

Decision

The mock API should reflect the target API with minimal additional methods. The mock should only include methods that already exist in the target API, ensuring consistency and ease of use.

Status

Accepted

Consequences

Positive:

Negative:


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