Shouldly.LanguageExt
0.1.0
dotnet add package Shouldly.LanguageExt --version 0.1.0
NuGet\Install-Package Shouldly.LanguageExt -Version 0.1.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="Shouldly.LanguageExt" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Shouldly.LanguageExt" Version="0.1.0" />
<PackageReference Include="Shouldly.LanguageExt" />
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 Shouldly.LanguageExt --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Shouldly.LanguageExt, 0.1.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 Shouldly.LanguageExt@0.1.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=Shouldly.LanguageExt&version=0.1.0
#tool nuget:?package=Shouldly.LanguageExt&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Shouldly.LanguageExt
Shouldly assertion extensions for LanguageExt 5 (beta).
- See LanguageExt C# Functional Programming Language Extensions for more information about the functional programming base library.
- See Shouldly for more information about the extensive set of extension methods for unit tests.
NuGet
Install-Package Shouldly.LanguageExt
Package link: Shouldly.LanguageExt on NuGet
Option
Methods
ShouldBeSome()ShouldBeSome(expected)ShouldBeSome(action)ShouldBeNone()
Example Usage
using Shouldly.LanguageExt;
using LanguageExt;
var option = Prelude.Some(8);
var optionNone = Option<int>.None;
option.ShouldBeSome();
option.ShouldBeSome(8);
option.ShouldBeSome(s => s.ShouldBe(8));
optionNone.ShouldBeNone();
Either
Methods
ShouldBeLeft()ShouldBeLeft(expected)ShouldBeLeft(action)ShouldBeRight()ShouldBeRight(expected)ShouldBeRight(action)
Example Usage
using Shouldly.LanguageExt;
using LanguageExt;
Either<int, string> left = Prelude.Left(8);
Either<int, string> right = Prelude.Right("a");
left.ShouldBeLeft();
left.ShouldBeLeft(8);
left.ShouldBeLeft(l => l.ShouldBe(8));
right.ShouldBeRight();
right.ShouldBeRight("a");
right.ShouldBeRight(r => r.ShouldBe("a"));
Validation
Methods
ShouldBeSuccess()ShouldBeSuccess(expected)ShouldBeSuccess(action)ShouldBeFail()ShouldBeFail(expected)ShouldBeFail(action)
Example Usage
using Shouldly.LanguageExt;
using LanguageExt;
Validation<int, string> success = "abc";
Validation<int, string> fail = 123;
success.ShouldBeSuccess();
success.ShouldBeSuccess("abc");
success.ShouldBeSuccess(v => v.ShouldBe("abc"));
fail.ShouldBeFail();
fail.ShouldBeFail(123);
fail.ShouldBeFail(err => err.ShouldBe(123));
Fin
Methods
ShouldBeSucc()ShouldBeSucc(expected)ShouldBeSucc(action)ShouldBeFail()ShouldBeFail(error)ShouldBeFail(errorMessage)ShouldBeFail(action)
Example Usage
using Shouldly.LanguageExt;
using LanguageExt;
using LanguageExt.Common;
Fin<int> successFin = Fin.Succ(8);
Fin<int> failedFin = Fin.Fail<int>("Error message");
successFin.ShouldBeSucc();
successFin.ShouldBeSucc(8);
successFin.ShouldBeSucc(v => v.ShouldBe(8));
failedFin.ShouldBeFail();
failedFin.ShouldBeFail("Error message");
failedFin.ShouldBeFail(Error.New("Error message"));
failedFin.ShouldBeFail(err => err.Message.ShouldBe("Error message"));
Try
Methods
ShouldBeSucc()ShouldBeSucc(expected)ShouldBeSucc(action)ShouldBeFail()ShouldBeFail(error)ShouldBeFail(errorMessage)ShouldBeFail(action)
Example Usage
using Shouldly.LanguageExt;
using LanguageExt;
using LanguageExt.Common;
Try<int> successTry = Try.Succ(42);
Try<int> failedTry = Try.Fail<int>(Error.New("Failed computation"));
successTry.ShouldBeSucc();
successTry.ShouldBeSucc(42);
successTry.ShouldBeSucc(v => v.ShouldBe(42));
failedTry.ShouldBeFail();
failedTry.ShouldBeFail("Failed computation");
failedTry.ShouldBeFail(Error.New("Failed computation"));
failedTry.ShouldBeFail(err => err.Message.ShouldBe("Failed computation"));
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- LanguageExt.Core (>= 5.0.0-beta-77)
- Shouldly (>= 4.3.0)
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 |
|---|---|---|
| 0.1.0 | 99 | 8/4/2026 |
Initial release supporting LanguageExt v5 core monads (Option, Either, Validation, Try, and Fin).