![]() |
VOOZH | about |
dotnet add package Rig.TUnit.WebAPI --version 0.1.0-beta.2
NuGet\Install-Package Rig.TUnit.WebAPI -Version 0.1.0-beta.2
<PackageReference Include="Rig.TUnit.WebAPI" Version="0.1.0-beta.2" />
<PackageVersion Include="Rig.TUnit.WebAPI" Version="0.1.0-beta.2" />Directory.Packages.props
<PackageReference Include="Rig.TUnit.WebAPI" />Project file
paket add Rig.TUnit.WebAPI --version 0.1.0-beta.2
#r "nuget: Rig.TUnit.WebAPI, 0.1.0-beta.2"
#:package Rig.TUnit.WebAPI@0.1.0-beta.2
#addin nuget:?package=Rig.TUnit.WebAPI&version=0.1.0-beta.2&prereleaseInstall as a Cake Addin
#tool nuget:?package=Rig.TUnit.WebAPI&version=0.1.0-beta.2&prereleaseInstall as a Cake Tool
WebApplicationFactoryextensions,TestAuthHeaderBuilder, and problem-details assertion helpers for ASP.NET Core Web API testing.
The HTTP counterpart to Rig.TUnit.Grpc. Extends Microsoft's
WebApplicationFactory<TEntryPoint> with a Rig-aware builder, a
TestAuthHeaderBuilder that crafts JWT / cookie / mTLS auth headers
matching the host's configured schemes, and ProblemDetailsAssert that
unpacks RFC 9457 responses for fluent assertion.
Together with Rig.TUnit.Http (for raw HttpClient scenarios) this covers
the full ASP.NET Core Web API surface.
ProblemDetails-shaped error responses.Rig.TUnit.Grpc.Program entry point (top-level
statements expose one implicitly since .NET 6).using Rig.TUnit.WebAPI.Helpers;
using Rig.TUnit.Core.Builder;
using Rig.TUnit.Core.Helpers;
var rig = new RigBuilder()
.WithIsolation(IsolationKey.FromExecutionContext())
.UseWebApi(cfg => cfg.ConfigureServices(s => s.AddLogging()))
.Build();
await using var _ = rig;
| Property | Type | Default | Description |
|---|---|---|---|
Environment |
string |
"Testing" |
Sets IHostEnvironment.EnvironmentName. |
ContentRoot |
string? |
null |
Override for static-file-serving tests. |
DefaultAcceptLanguage |
string |
"en-US" |
Sets Accept-Language on the shared client. |
Rig.TUnit.WebAPI.Builder.WebApiRigBuilder — CRTP builderRig.TUnit.WebAPI.Authentication.TestAuthHeaderBuilder — JWT / cookieRig.TUnit.WebAPI.Helpers.ProblemDetailsAssert — RFC 9457 assertionEach WebApplicationFactory lives in its own TestServer; DI services are
fresh per test. Auth helpers generate test-only JWTs with the
IsolationKey-derived subject claim so logs are cross-correlatable.
Program.cs build + service graph).Unauthorized despite a valid test JWT — confirm the signing key
returned by TestAuthHeaderBuilder matches the one the host's
JwtBearerOptions is configured with; they must share the same test
certificate.Program — top-level statements produce an
implicit internal Program class; add [assembly: InternalsVisibleTo("YourTests")]
or declare an explicit public partial class Program;.See .
WebApplicationFactory runs the host on a TestServer, not Kestrel —
features that require the Kestrel feature-collection (connection-ID
inspection, raw-socket access) will not work.See ;
baseline in benchmarks/baseline-005.json.
MIT. See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Rig.TUnit.WebAPI:
| Package | Downloads |
|---|---|
|
Rig.TUnit.All
Meta-package containing every Rig.TUnit.* package. DISCOURAGED — prefer per-feature or per-stack meta-packages (Rig.TUnit, Rig.TUnit.Microservices). |
|
|
Rig.TUnit
Convenience meta-package bundling Core + Mediator + Grpc + WebAPI — the default entry point for most projects. Use Rig.TUnit.All only when you need every package. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.2 | 73 | 4/27/2026 |
| 0.0.0-alpha.0.14 | 78 | 4/26/2026 |