Trellis.Testing.AspNetCore 3.0.0-alpha.524

This is a prerelease version of Trellis.Testing.AspNetCore.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Trellis.Testing.AspNetCore --version 3.0.0-alpha.524
                    
NuGet\Install-Package Trellis.Testing.AspNetCore -Version 3.0.0-alpha.524
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Trellis.Testing.AspNetCore" Version="3.0.0-alpha.524" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Trellis.Testing.AspNetCore" Version="3.0.0-alpha.524" />
                    
Directory.Packages.props
<PackageReference Include="Trellis.Testing.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Trellis.Testing.AspNetCore --version 3.0.0-alpha.524
                    
#r "nuget: Trellis.Testing.AspNetCore, 3.0.0-alpha.524"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Trellis.Testing.AspNetCore@3.0.0-alpha.524
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Trellis.Testing.AspNetCore&version=3.0.0-alpha.524&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Trellis.Testing.AspNetCore&version=3.0.0-alpha.524&prerelease
                    
Install as a Cake Tool

Trellis.Testing.AspNetCore

NuGet Package

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 — CreateClientWithActor injects test actors via HTTP headers
  • DI service replacement — ReplaceDbProvider, ReplaceSingleton, ReplaceResourceLoader
  • Fake time provider — WithFakeTimeProvider for controlling TimeProvider in tests
  • MSAL token acquisition — MsalTestTokenProvider for E2E tests against real Entra ID tenants

Documentation

Part of Trellis

This package is part of the Trellis framework.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.526 0 9/30/2026
3.0.0-alpha.524 45 9/27/2026
3.0.0-alpha.520 67 9/25/2026
3.0.0-alpha.516 149 9/22/2026
3.0.0-alpha.513 58 9/22/2026
3.0.0-alpha.505 177 9/13/2026
3.0.0-alpha.495 216 8/24/2026
3.0.0-alpha.458 170 8/19/2026
3.0.0-alpha.455 111 8/19/2026
3.0.0-alpha.449 72 8/18/2026
3.0.0-alpha.447 75 8/18/2026
3.0.0-alpha.432 119 7/6/2026
3.0.0-alpha.428 115 7/3/2026
3.0.0-alpha.425 137 6/27/2026
3.0.0-alpha.419 94 6/24/2026
3.0.0-alpha.418 159 6/23/2026
3.0.0-alpha.417 84 6/23/2026
3.0.0-alpha.397 90 6/18/2026
3.0.0-alpha.396 86 6/18/2026
3.0.0-alpha.394 95 6/18/2026
Loading failed