Trellis.Testing.AspNetCore
3.0.0-alpha.721
dotnet add package Trellis.Testing.AspNetCore --version 3.0.0-alpha.721
NuGet\Install-Package Trellis.Testing.AspNetCore -Version 3.0.0-alpha.721
<PackageReference Include="Trellis.Testing.AspNetCore" Version="3.0.0-alpha.721" />
<PackageVersion Include="Trellis.Testing.AspNetCore" Version="3.0.0-alpha.721" />
<PackageReference Include="Trellis.Testing.AspNetCore" />
paket add Trellis.Testing.AspNetCore --version 3.0.0-alpha.721
#r "nuget: Trellis.Testing.AspNetCore, 3.0.0-alpha.721"
#:package Trellis.Testing.AspNetCore@3.0.0-alpha.721
#addin nuget:?package=Trellis.Testing.AspNetCore&version=3.0.0-alpha.721&prerelease
#tool nuget:?package=Trellis.Testing.AspNetCore&version=3.0.0-alpha.721&prerelease
Trellis.Testing.AspNetCore
ASP.NET Core integration test utilities for Trellis applications.
Installation
dotnet add package Trellis.Testing.AspNetCore
Quick Example
using Trellis.Testing.AspNetCore;
// Create an authenticated test client
var client = _factory.CreateClientWithActor("user-1", "Orders.Read", "Orders.Write");
// Swap the database provider for tests
builder.ConfigureServices(services =>
services.ReplaceDbProvider<AppDbContext>(options =>
options.UseSqlite(connection)));
// Control time in tests
_factory = _factory.WithFakeTimeProvider(out var fakeTime);
fakeTime.SetUtcNow(DateTimeOffset.UtcNow.AddDays(-7));
Key Features
- WebApplicationFactory helpers —
CreateClientWithActorinjects test actors via HTTP headers - DI service replacement —
ReplaceDbProvider,ReplaceSingleton,ReplaceResourceLoader - Fake time provider —
WithFakeTimeProviderfor controllingTimeProviderin tests - MSAL token acquisition —
MsalTestTokenProviderfor E2E tests against real Entra ID tenants .httpreplay — parse service examples, chain named responses, generate a fresh{{$guid}}per occurrence, and reject unresolved placeholders before sending
Use HttpFileParser.ParseFile, HttpFileRunner.RunAsync, and
HttpFileAssertions.AssertExpectationsMet from Trellis.Testing.AspNetCore.Http with a
WebApplicationFactory client to guard service .http examples in CI. GUIDs refresh even
when the same parsed requests are reused; missing variables fail with request/token/location
diagnostics. The caller disposes successful responses. See the API reference for supported
syntax and the narrower Showcase live-host transcript script.
Documentation
Part of Trellis
This package is part of the Trellis framework.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- FluentAssertions (>= 7.2.2)
- Microsoft.AspNetCore.Mvc.Testing (>= 11.0.0)
- Microsoft.EntityFrameworkCore (>= 11.0.0)
- Microsoft.Extensions.DependencyModel (>= 11.0.0)
- Microsoft.Extensions.TimeProvider.Testing (>= 11.0.0)
- Microsoft.Identity.Client (>= 4.92.0)
- OpenTelemetry.Api (>= 1.20.1)
- Trellis.Authorization (>= 3.0.0-alpha.721)
- Trellis.Testing (>= 3.0.0-alpha.721)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-alpha.721 | 84 | 11/15/2026 |
| 3.0.0-alpha.582 | 156 | 10/19/2026 |
| 3.0.0-alpha.574 | 256 | 10/14/2026 |
| 3.0.0-alpha.571 | 78 | 10/13/2026 |
| 3.0.0-alpha.557 | 146 | 10/8/2026 |
| 3.0.0-alpha.554 | 107 | 10/8/2026 |
| 3.0.0-alpha.553 | 72 | 10/7/2026 |
| 3.0.0-alpha.542 | 131 | 10/5/2026 |
| 3.0.0-alpha.539 | 78 | 10/4/2026 |
| 3.0.0-alpha.532 | 110 | 10/2/2026 |
| 3.0.0-alpha.527 | 102 | 10/1/2026 |
| 3.0.0-alpha.526 | 74 | 9/30/2026 |
| 3.0.0-alpha.524 | 72 | 9/27/2026 |
| 3.0.0-alpha.520 | 92 | 9/25/2026 |
| 3.0.0-alpha.516 | 231 | 9/22/2026 |
| 3.0.0-alpha.513 | 84 | 9/22/2026 |
| 3.0.0-alpha.505 | 197 | 9/13/2026 |
| 3.0.0-alpha.495 | 245 | 8/24/2026 |
| 3.0.0-alpha.458 | 195 | 8/19/2026 |
| 3.0.0-alpha.455 | 160 | 8/19/2026 |