Jeninnet.Assertions.Analyzer 1.0.0

Requires NuGet 7.3.0 or higher.

dotnet add package Jeninnet.Assertions.Analyzer --version 1.0.0
                    
NuGet\Install-Package Jeninnet.Assertions.Analyzer -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="Jeninnet.Assertions.Analyzer" 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.
<PackageVersion Include="Jeninnet.Assertions.Analyzer" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Jeninnet.Assertions.Analyzer">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jeninnet.Assertions.Analyzer --version 1.0.0
                    
#r "nuget: Jeninnet.Assertions.Analyzer, 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.
#:package Jeninnet.Assertions.Analyzer@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jeninnet.Assertions.Analyzer&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Jeninnet.Assertions.Analyzer&version=1.0.0
                    
Install as a Cake Tool

Jeninnet.Assertions.Analyzer

Roslyn analyzer with code fixes that suggests fluent Should() assertions over convertible MSTest, xUnit, and NUnit calls, easing migration to Jeninnet.Assertions.

Installation

dotnet add package Jeninnet.Assertions.Analyzer

The analyzer targets netstandard2.0 (loads in every Roslyn host) and pulls the core Jeninnet.Assertions package automatically, so fixed code always resolves Should().

Rules

Rule IDs use the JNA prefix (Jeninnet Assertions).

ID Severity Converts
JNA1001 Info Assert.AreEqual/AreNotEqual, xUnit Assert.Equal/NotEqual, Assert.Contains, NUnit Is.EqualTo/Is.Not.EqualTo → Be / NotBe / Contain
JNA1002 Info Assert.IsTrue/IsFalse/IsNull/IsNotNull, xUnit Assert.True/False/Null/NotNull, NUnit Is.True/False/Null/Is.Not.Null → BeTrue / BeFalse / BeNull / NotBeNull

Suggestions appear only when the generated code is guaranteed to compile (verified by speculative binding); a message: argument becomes because:. Info severity never breaks TreatWarningsAsErrors builds. Tolerance, comparer, and culture overloads are deliberately left manual.

License

MIT — see LICENSE.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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.0.0 181 10/13/2026