You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New rules:
- **PosInfoMoq2004**: Check that no arguments is passed to mocked interface (fixes#14).
- **PosInfoMoq2005**: Check the arguments passed to mocked abstract classes (fixes#15).
- **PosInfoMoq2006**: Check setups with Protected() mocks (fixes#10 and fixes#11).
Improvements/fixes:
- The **PosInfoMoq2000** rule does not raise an error when the `Returns()`/`ReturnsAsync()` methods is invalided by the compiler (fixes#16).
- The **PosInfoMoq2001** rule check that each chained member access in a `Setup()` method is overridable (fixes#17).
Internal:
- Propagate the cancellation token to allow to cancel analysis if the host (the compiler for example) cancel the analysis process.
- Migrates the Azure Pipelines to Github actions (fixes#9).
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,4 +41,7 @@ All the rules of this category should not be disabled (or changed their severity
41
41
|[PosInfoMoq2001: The `Setup()` method must be used only on overridable members](docs/Compilation/PosInfoMoq2001.md)) | The `Setup()` method must be applied only for overridable members. |
42
42
|[PosInfoMoq2002: `Mock<T>` class can be used only to mock non-sealed class](docs/Compilation/PosInfoMoq2002.md)| The `Mock<T>` can mock only interfaces or non-`sealed` classes. |
43
43
|[PosInfoMoq2003: The `Callback()` delegate expression must match the signature of the mocked method](docs/Compilation/PosInfoMoq2003.md)| The delegate in the argument of the `Callback()` method must match the signature of the mocked method. |
44
+
|[PosInfoMoq2004: Constructor arguments cannot be passed for interface mocks](docs/Compilation/PosInfoMoq2004.md)| No arguments can be passed to a mocked interface. |
45
+
|[PosInfoMoq2005: Constructor arguments must match the constructors of the mocked class](docs/Compilation/PosInfoMoq2005.md)| When instantiating a `Mock<T>`, the parameters must match one of the constructors of the mocked type. |
46
+
|[PosInfoMoq2006: The Protected().Setup() method must be use with overridable protected or internal methods](docs/Compilation/PosInfoMoq2006.md)| When using the `Protected().Setup()` configuration, the method mocked must be overridable and protected or internal. |
0 commit comments