Futurum.Test
1.0.6
dotnet add package Futurum.Test --version 1.0.6
NuGet\Install-Package Futurum.Test -Version 1.0.6
<PackageReference Include="Futurum.Test" Version="1.0.6" />
paket add Futurum.Test --version 1.0.6
#r "nuget: Futurum.Test, 1.0.6"
// Install Futurum.Test as a Cake Addin #addin nuget:?package=Futurum.Test&version=1.0.6 // Install Futurum.Test as a Cake Tool #tool nuget:?package=Futurum.Test&version=1.0.6
Futurum.Test
A dotnet testing library, allowing you to test code that uses Futurum.Core. It contains a comprehensive set of assertions for testing Futurum.Core types.
Result
ShouldBeSuccess
Checks that the result is a success.
result.ShouldBeSuccess();
ShouldBeSuccessWithValue
Checks that the result is a success and that the value is equal to the expected value.
result.ShouldBeSuccessWithValue(expectedValue);
ShouldBeSuccessWithValueEquivalentTo
Checks that the result is a success and that the value is equivalent to the expected value.
result.ShouldBeSuccessWithValueEquivalentTo(equivalentValue);
ShouldBeSuccessWithValueEquivalentToAsync
Checks that the result is a success and that the value is equivalent to the expected value.
result.ShouldBeSuccessWithValueEquivalentToAsync(numbers);
NOTE This method works with IAsyncEnumerable<T>.
ShouldBeSuccessWithValueAssertion
Checks that the result is a success and that the value passes the assertions specified.
result.ShouldBeSuccessWithValueAssertion(x => x.Should().Be(expectedValue));
ShouldBeFailure
Checks that the result is a failure.
result.ShouldBeFailure();
ShouldBeFailureWithError
Checks that the result is a failure and that the error is equal to the expected error.
result.ShouldBeFailureWithError(expectedErrorMessage);
ShouldBeFailureWithErrorSafe
Checks that the result is a failure and that the error is equal to the expected error.
result.ShouldBeFailureWithErrorSafe(expectedErrorMessage);
NOTE This will call ToErrorStringSafe on the error.
ShouldBeFailureWithErrorContaining
Checks that the result is a failure and that the error contains the expected error.
result.ShouldBeFailureWithErrorContaining(expectedErrorMessage);
ShouldBeFailureWithErrorSafeContaining
Checks that the result is a failure and that the error contains the expected error.
result.ShouldBeFailureWithErrorContaining(expectedErrorMessage);
NOTE This will call ToErrorStringSafe on the error.
Option
ShouldBeHasValue
Check that the option has a value.
option.ShouldBeHasValue();
ShouldBeHasValueWithValue
Check that the option has a value and that the value is equal to the expected value.
option.ShouldBeHasValueWithValue(expectedValue);
ShouldBeHasValueWithValueEquivalentTo
Check that the option has a value and that the value is equivalent to the expected value.
option.ShouldBeHasValueWithValueEquivalentTo(equivalentValue);
ShouldBeHasValueWithValueAssertion
Check that the option has a value and that the value passes the assertions specified.
option.ShouldBeHasValueWithValueAssertion(x => x.Should().Be(expectedValue));
ShouldBeHasNoValue
Check that the option has no value.
option.ShouldBeHasNoValue();
Product | Versions 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. |
-
net6.0
- FluentAssertions (>= 6.8.0)
- Futurum.Core (>= 1.0.15)
- Microsoft.NET.Test.Sdk (>= 17.4.0)
- Moq (>= 4.18.2)
- xunit (>= 2.4.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.