Qowaiv.Validation.TestTools
1.0.0
dotnet add package Qowaiv.Validation.TestTools --version 1.0.0
NuGet\Install-Package Qowaiv.Validation.TestTools -Version 1.0.0
<PackageReference Include="Qowaiv.Validation.TestTools" Version="1.0.0" />
paket add Qowaiv.Validation.TestTools --version 1.0.0
#r "nuget: Qowaiv.Validation.TestTools, 1.0.0"
// Install Qowaiv.Validation.TestTools as a Cake Addin #addin nuget:?package=Qowaiv.Validation.TestTools&version=1.0.0 // Install Qowaiv.Validation.TestTools as a Cake Tool #tool nuget:?package=Qowaiv.Validation.TestTools&version=1.0.0
Qowaiv.Validation Test Tools
These test tools help writing meaningful tests an asserting the state of a
Result
or Result<T>
. This is done by extending on
FluentAssertions.
These assertions could look like this:
Result.For(17).Should().BeValid()
.WithoutMessages()
.Value.Should().Be(17);
Where the chain after .Value
is regular FluentAssertions.
Other options for .IsValid()
are:
Result.For(17).Shoud().BeValid()
.WithMessage(ValidationMessage.Warn("Are you sure?"))
.Value.Should().Be(17);
and
Result.For(17).Should().BeValid()
.WithMessages(/* ... */)
.Value.Should().Be(17);
Obviously, you can also check for invalidness:
Result.For(17).Should().BeInvalid();
In that case you do not have the option of .WithoutMessages()
, obviously,
as Result
is defined to be invalid bases on containing at least one error
message. Furthermore, it does not exposes the .Value
as that is not
accessible for an invalid result.
All (except for the .Value
) is also for the non-generic Result
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 is compatible. 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. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FluentAssertions (>= 6.12.2)
- FluentValidation (>= 11.10.0)
- Microsoft.CSharp (>= 4.7.0)
- Qowaiv (>= 7.2.0)
- Qowaiv.Validation.Abstractions (>= 1.0.0)
- Qowaiv.Validation.DataAnnotations (>= 3.0.0)
- Qowaiv.Validation.Fluent (>= 2.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
-
net8.0
- FluentAssertions (>= 6.12.2)
- FluentValidation (>= 11.10.0)
- Qowaiv (>= 7.2.0)
- Qowaiv.Validation.Abstractions (>= 1.0.0)
- Qowaiv.Validation.DataAnnotations (>= 3.0.0)
- Qowaiv.Validation.Fluent (>= 2.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
-
net9.0
- FluentAssertions (>= 6.12.2)
- FluentValidation (>= 11.10.0)
- Qowaiv (>= 7.2.0)
- Qowaiv.Validation.Abstractions (>= 1.0.0)
- Qowaiv.Validation.DataAnnotations (>= 3.0.0)
- Qowaiv.Validation.Fluent (>= 2.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.0.0
- Add .NET 9.0 target.
- Drop .NET 5.0, NET6.0, NET7.0 targets. (BREAKING)
- Drop public Diagnostics.Contracts. BREAKING)
v0.3.0
- Support .NET 7.0. #62
v0.2.1
- Nullable anotations. #48
v0.1.1
- Use FluentAssertions to validate Result and Result<T> (#37)
v0.1.0
- Qowaiv.Validation.Abstractions dependency
v0.0.3
- FluentValidation 10.2.0 dependency.
v0.0.2
- ValidationMessageAssert.IsValid() returns the model (#20)