See the version list below for details.
dotnet add package NUnit.Analyzers --version 2.5.0
NuGet\Install-Package NUnit.Analyzers -Version 2.5.0
<PackageReference Include="NUnit.Analyzers" Version="2.5.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add NUnit.Analyzers --version 2.5.0
#r "nuget: NUnit.Analyzers, 2.5.0"
// Install NUnit.Analyzers as a Cake Addin #addin nuget:?package=NUnit.Analyzers&version=2.5.0 // Install NUnit.Analyzers as a Cake Tool #tool nuget:?package=NUnit.Analyzers&version=2.5.0
This is a suite of analyzers that target the NUnit testing framework. Right now, the code is separate from the NUnit framework, so if you want to try out the analyzers you'll need to download the analyzers separately as a nuget package. In the future the analyzers may be added as part of the NUnit framework package but that hasn't been done yet.
The latest stable release of the NUnit Analyzers is available on NuGet or can be downloaded from GitHub. Note that for Visual Studio 2017 one must use versions below 3.0. Version 3.0 and upwards require Visual Studio 2019, these versions also enables supression of compiler errors such as errors arising from nullable reference types.
Prerelease nuget packages can be found on MyGet. Please try out the package and report bugs and feature requests.
The full list of analyzers can be found in the documentation.
Below we give two examples of analyzers. One will look for methods with the
[TestCase] attribute and makes sure the argument values are correct for the types of the method parameters along with the
ExpectedResult value if it is provided.
<img src="https://user-images.githubusercontent.com/1007631/44311794-269a7200-a3ee-11e8-86a0-1d290b355ac5.gif" alt="testcase analyzers" width="750"/>
The other analyzer looks for classic model assertions (e.g.
Assert.IsTrue(), etc.). This analyzer contains a fixer that can translate the classic model assertions into constraint model assertions (
<img src="https://user-images.githubusercontent.com/1007631/44311791-213d2780-a3ee-11e8-90b8-6d144c0e3dbd.gif" alt="classic model assertions analyzers" width="1000"/>
NUnit analyzers are Open Source software and released under the MIT license, which allow the use of the analyzers in free and commercial applications and libraries without restrictions.
There are several ways to contribute to this project. One can try things out, report bugs, propose improvements and new functionality, work on issues (especially the issues marked with the labels help wanted and Good First Issue), and in general join in the conversations. See Contributing for more information.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NUnit.Analyzers:
GitHub repositories (32)
Showing the top 5 popular GitHub repositories that depend on NUnit.Analyzers:
Distributed Application Framework for .NET
Extensions to LINQ to Objects
Interactive plotting library for .NET
☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
Project : Design Patterns Examples in C#
See the release notes on https://github.com/nunit/nunit.analyzers/blob/master/CHANGES.txt.