JNet.Util.ShouldlyFluentExtension 1.0.0

dotnet add package JNet.Util.ShouldlyFluentExtension --version 1.0.0                
NuGet\Install-Package JNet.Util.ShouldlyFluentExtension -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="JNet.Util.ShouldlyFluentExtension" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JNet.Util.ShouldlyFluentExtension --version 1.0.0                
#r "nuget: JNet.Util.ShouldlyFluentExtension, 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 JNet.Util.ShouldlyFluentExtension as a Cake Addin
#addin nuget:?package=JNet.Util.ShouldlyFluentExtension&version=1.0.0

// Install JNet.Util.ShouldlyFluentExtension as a Cake Tool
#tool nuget:?package=JNet.Util.ShouldlyFluentExtension&version=1.0.0                


ShouldlyFluentExtension is a powerful and expressive fluent API designed to streamline writing unit tests with ease and readability. It provides a concise and natural language syntax for making assertions, eliminating the need for explicit variable declarations, and enhancing code maintainability.


  • Fluent API: Easily chain multiple assertions on the same object without the need to assign variables manually. This results in clean and concise test code that is more maintainable and less error-prone.
  • Eliminate Repetition: By removing the need for repetitive variable declarations, your test code becomes more compact and focused, reducing the chances of copy-paste errors and code duplication.
  • Readable Assertions: The expressive syntax of ShouldlyFluentExtension enables you to write self-explanatory assertions, making it easier for other team members to understand the intent of each test case.
  • Integration with NUnit: Seamless integration with the NUnit testing framework, allowing you to leverage the full power of NUnit's test runners and reporting capabilities.

Example Usage

With ShouldlyFluentExtension, writing unit tests becomes more elegant and efficient. Say goodbye to boilerplate variable declarations and embrace the clarity and productivity provided by this lightweight, yet feature-rich library.

    .ShouldBe(x => x.Id, 1)
    .ShouldBe(x => x.Name, "Num");

Full example:

using ShouldlyFluentExtension;

Item Find(int i) => new Item(i, "Num");

    .ShouldBe(x => x.Id, 1)
    .ShouldBe(x => x.Name, "Num");

Console.WriteLine("Hello, World!");

record Item(int Id, string Name);

Getting Started

  1. Install the ShouldlyFluentExtension NuGet package in your test project.
  2. Use the provided fluent syntax to write expressive assertions in your unit tests.
  3. Enjoy more readable and maintainable test code that empowers your testing efforts.


Use NuGet Package Manager to install ShouldlyFluentExtension:

Install-Package JNet.Util.ShouldlyFluentExtension

Documentation and Contribution

For the latest updates, documentation, and contribution guidelines, visit our GitHub repository: ShouldlyFluentExtension

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in 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 135 7/27/2023