PosInformatique.Moq.Analyzers 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package PosInformatique.Moq.Analyzers --version 1.0.0                
NuGet\Install-Package PosInformatique.Moq.Analyzers -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PosInformatique.Moq.Analyzers" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PosInformatique.Moq.Analyzers --version 1.0.0                
#r "nuget: PosInformatique.Moq.Analyzers, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PosInformatique.Moq.Analyzers as a Cake Addin
#addin nuget:?package=PosInformatique.Moq.Analyzers&version=1.0.0

// Install PosInformatique.Moq.Analyzers as a Cake Tool
#tool nuget:?package=PosInformatique.Moq.Analyzers&version=1.0.0                

PosInformatique.Moq.Analyzers

PosInformatique.Moq.Analyzers is a library to verify syntax and code design when writing the unit tests using the Moq library.

Installing from NuGet

The PosInformatique.Moq.Analyzers library is available directly on the Nuget official website.

To download and install the library to your Visual Studio unit test projects use the following NuGet command line

Install-Package PosInformatique.Moq.Analyzers

The analyzer is automatically added and activated with their default severity levels.

Rules

This section describes the list of the rules analyzed by the library to improve code quality of the unit tests using the Moq library.

Design

Design rules used to make your unit tests more strongly strict.

Rule Description
MQ1000: Verify() and VerifyAll() methods should be called when instantiate a Mock<T> instances When instantiating a Mock<T> in the Arrange phase of an unit test, Verify() or VerifyAll() method should be called in the Assert phase to check the setup methods has been called.
MQ1001: The Mock<T> instance behavior should be defined to Strict mode When instantiating a Mock<T> instance, the MockBehavior of the Mock instance should be defined to Strict.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.9.1 74 7/17/2024
1.9.1-rc.3 35 7/13/2024
1.9.1-rc.2 34 7/11/2024
1.9.1-rc.1 24 7/11/2024
1.9.0-rc.1 42 7/9/2024
1.8.0 100 7/3/2024
1.8.0-rc.2 43 7/2/2024
1.8.0-rc.1 41 7/1/2024
1.7.0 81 6/28/2024
1.7.0-rc.1 41 6/25/2024
1.6.0 73 6/24/2024
1.6.0-rc.6 40 6/24/2024
1.6.0-rc.5 42 6/24/2024
1.6.0-rc.4 46 6/20/2024
1.6.0-rc.3 39 6/13/2024
1.6.0-rc.2 38 6/13/2024
1.6.0-rc.1 49 6/12/2024
1.5.0 88 6/10/2024
1.4.0 408 2/26/2024
1.3.0 317 12/5/2023
1.2.0 215 11/7/2023
1.1.0 155 11/7/2023
1.0.0 184 11/1/2023

1.0.0
     - Initial version with the followings rules:
       - MQ1000: Verify() and VerifyAll() methods should be called when instantiate a Mock<T> instances
       - MQ1001: The Mock<T> instance behavior should be defined to Strict mode.