rjmurillo/moq.analyzers

View on GitHub
docs/rules/README.md

Summary

Maintainability
Test Coverage
# Diagnostics / rules

| ID                      | Title                                                                                   |
| ----------------------- | --------------------------------------------------------------------------------------- |
| [Moq1000](./Moq1000.md) | Sealed classes cannot be mocked                                                         |
| [Moq1001](./Moq1001.md) | Mocked interfaces cannot have constructor parameters                                    |
| [Moq1002](./Moq1002.md) | Parameters provided into mock do not match any existing constructors                    |
| [Moq1100](./Moq1100.md) | Callback signature must match the signature of the mocked method                        |
| [Moq1101](./Moq1101.md) | SetupGet/SetupSet should be used for properties, not for methods                        |
| [Moq1200](./Moq1200.md) | Setup should be used only for overridable members                                       |
| [Moq1201](./Moq1201.md) | Setup of async methods should use `.ReturnsAsync` instance instead of `.Result`         |
| [Moq1300](./Moq1300.md) | `Mock.As()` should take interfaces only                                                 |
| [Moq1400](./Moq1400.md) | Explicitly choose a mocking behavior instead of relying on the default (Loose) behavior |