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
PosInformatique.Moq.Analyzers is a library to verify syntax and code design when writing the unit tests using the Moq library.
2
+
PosInformatique.Moq.Analyzers is a library to verify syntax and code design when writing the unit tests using the [Moq](https://github.com/devlooped/moq) library.
3
+
4
+
## Installing from NuGet
5
+
The [PosInformatique.Moq.Analyzers](https://www.nuget.org/packages/PosInformatique.FluentAssertions.Json/)
To download and install the library to your Visual Studio unit test projects use the following NuGet command line
11
+
12
+
```
13
+
Install-Package PosInformatique.Moq.Analyzers
14
+
```
15
+
16
+
The analyzers are automatically added and activated with their default warning levels.
17
+
18
+
## Rules
19
+
20
+
This section describes the list of the rules analyzed by the library to improve code quality of the unit tests using
21
+
the [Moq](https://github.com/devlooped/moq) library.
22
+
23
+
### Design
24
+
25
+
Design rules used to make your unit tests more strongly strict.
26
+
27
+
| Rule | Description |
28
+
| - | - |
29
+
|[MQ1000: Verify() or VerifyAll() methods should be called when instantiate a Mock<T> instances](docs/design/MQ1000.md)| When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused. |
30
+
|[MQ1001: The Mock<T> instance behavior should be defined to Strict mode](docs/design/MQ1001.md)| A class declares and implements an instance field that is a System.IDisposable type and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface. |
0 commit comments