LanguageExt extensions for FluentAssertions.
$ dotnet add package FluentAssertions.LanguageExtInstall-Package FluentAssertions.LanguageExt
BeSome()BeSome(expected)BeSome(action)BeNone()using FluentAssertions;
using FluentAssertions.LanguageExt;
...
var option = Prelude.Some(123);
var optionnone = Option<int>.None;
option.Should().BeSome();
option.Should().BeSome(8);
option.Should().BeSome(s => s.Should().Be(8));
optionnone.Should().BeNone();
Be(expected)BeLeft()BeLeft(action)BeRight()BeRight(action)BeBottom()using FluentAssertions;
using FluentAssertions.LanguageExt;
...
Either<int, string> left = Prelude.Left(8);
Either<int, string> right = Prelude.Right("a");
left.Should().BeLeft();
left.Should().BeLeft(l => l.Should().Be(8));
left.Should().Be(8);
right.Should().BeRight();
right.Should().BeRight(r => r.Should().Be("a"));
right.Should().Be("a");
BeFail()BeSuccess()BeSuccess(action)Be(expected)BeFail()BeSuccess()BeFail()BeSome()BeSome(action)BeNone()BeNoneOrFail()Be(expected)