Vostra.Result.Testing
1.2.1
dotnet add package Vostra.Result.Testing --version 1.2.1
NuGet\Install-Package Vostra.Result.Testing -Version 1.2.1
<PackageReference Include="Vostra.Result.Testing" Version="1.2.1" />
<PackageVersion Include="Vostra.Result.Testing" Version="1.2.1" />
<PackageReference Include="Vostra.Result.Testing" />
paket add Vostra.Result.Testing --version 1.2.1
#r "nuget: Vostra.Result.Testing, 1.2.1"
#:package Vostra.Result.Testing@1.2.1
#addin nuget:?package=Vostra.Result.Testing&version=1.2.1
#tool nuget:?package=Vostra.Result.Testing&version=1.2.1
Vostra.Result.Testing
Transport-neutral testing toolkit for Vostra.Result —
the fluent chain-and-assert layer, over any Task<Result<T>>. Depends only on the core type (no
ASP.NET Core), so it works against an HTTP call, a queue round-trip, or any fallible async operation.
// any function returning Task<Result<T>> composes:
var settled = await SendAndAwaitAsync(workOrder) // your transport -> Task<Result<State>>
.Then(state => AdvanceAsync(state)) // runs only if the previous step succeeded
.Assert(s => s.Status.Should().Be(Status.Applied)) // inline checkpoint
.ShouldBeSuccess(); // terminal: returns the value or throws
- Chain:
Then(from Core) runs the next step only if the previous succeeded; the first failure short-circuits, so one terminal assertion reports whatever broke, wherever it broke. - Assert by identity:
ShouldBeSuccess/ShouldHaveError(code | ErrorType)/Assert/ShouldBeNotFound/ShouldBeValidation/ … — never substring matching. - Rich diagnostics: failures throw a
VostraAssertionExceptioncomposed only on failure. Attach aRequestContextto your errors —error.WithRequestContext(new RequestContext("SEND", "queue", body))— to get the same "what was attempted" line on any transport.
For ASP.NET Core APIs, add
Vostra.Result.AspNetCore.Testing — a
TestHttpClient that turns the HTTP round-trip back into a Result<T> (typed error rebuilt from RFC 7807)
and feeds this same chain-and-assert layer.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- Vostra.Result (>= 1.2.1)
-
net8.0
- Vostra.Result (>= 1.2.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Vostra.Result.Testing:
| Package | Downloads |
|---|---|
|
Vostra.Result.AspNetCore.Testing
HTTP integration-testing toolkit for Vostra.Result — a TestHttpClient returning Result<T> with typed-error reconstruction over the Vostra.Result.AspNetCore response contract. |
GitHub repositories
This package is not used by any popular GitHub repositories.