Anarchy.Toolkit.Testing.Web 1.0.8

There is a newer version of this package available.
See the version list below for details.
dotnet add package Anarchy.Toolkit.Testing.Web --version 1.0.8
                    
NuGet\Install-Package Anarchy.Toolkit.Testing.Web -Version 1.0.8
                    
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="Anarchy.Toolkit.Testing.Web" Version="1.0.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Anarchy.Toolkit.Testing.Web" Version="1.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Anarchy.Toolkit.Testing.Web" />
                    
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 Anarchy.Toolkit.Testing.Web --version 1.0.8
                    
#r "nuget: Anarchy.Toolkit.Testing.Web, 1.0.8"
                    
#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 Anarchy.Toolkit.Testing.Web@1.0.8
                    
#: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=Anarchy.Toolkit.Testing.Web&version=1.0.8
                    
Install as a Cake Addin
#tool nuget:?package=Anarchy.Toolkit.Testing.Web&version=1.0.8
                    
Install as a Cake Tool

Anarchy.Toolkit.Testing.Web

Test helpers for REST APIs using the toolkit's web pipeline.

dotnet add package Anarchy.Toolkit.Testing.Web
  • Derive from RestApiTestCaseBase<TStartup, TAppSettings> to exercise native and AWS Lambda request pipelines.
  • TestableLambdaEntrypoint supports Lambda-based tests; MockAuthorizationToken<TAppSettings>(scopes) helps with authorization scenarios.
  • Use the shared Testing package for fixtures and assertions.

When to use it

Use this package for API tests that need to exercise routing, middleware, authentication and response serialization through the toolkit's native ASP.NET Core and Lambda hosting paths. It complements unit tests; external dependencies still need appropriate test implementations or isolated infrastructure.

How to use it

  1. Derive a test class from RestApiTestCaseBase<TStartup, TAppSettings>, supplying a WebApplicationFactory<TStartup>, a TestableLambdaEntrypoint<TStartup> and the application's authorization scopes. The settings type must implement IAuthServiceAppSettings.
  2. Build requests with Get, Post, Put or Patch, and assert status and parsed output with the endpoint test methods. Configure embedded test settings and the mock token issuer for authenticated scenarios.
  3. Use TestEndpointAsync when native and Lambda responses should be deterministic and equal. For timestamps, generated IDs or other variable output, call TestEndpointNativeAsync and TestEndpointLambdaAsync separately and assert the relevant behavior in each.

The runnable greeting API test shows the fixture constructor and a request assertion.

See the sample tests, testing conventions and toolkit overview.

Releases

1.0.8

  • docs: expand XML docblocks across all projects for the DocFX API reference

1.0.7

  • References Anarchy.Toolkit.Web 1.0.7, aligned with the .NET 10 LTS.

1.0.6

  • refactor(src): clean up code style across library packages
  • chore(deps): update AWS SDK, Lambda ASP.NET Core server and MySqlConnector packages

1.0.5

  • chore(deps): update AWS SDK packages

1.0.3

  • build: migrate local automation to build tooling

1.0.2

  • docs: expand package guides and release histories
  • chore(deps): update AWS, Polly, and xUnit packages

1.0.1

  • Added a package-specific NuGet README.

1.0.0

  • Introduced REST API test bases, a testable Lambda entry point and HTTP request helpers.
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
2.0.1 0 11/21/2026
2.0.0 0 11/20/2026
1.2.1 105 11/17/2026
1.2.0 106 11/17/2026
1.1.0 87 11/17/2026
1.0.8 108 11/16/2026
1.0.7 116 11/15/2026
1.0.6 111 11/14/2026
1.0.5 111 11/13/2026
1.0.4 83 11/9/2026
1.0.3 81 11/9/2026
1.0.1 103 11/6/2026
1.0.0 90 11/5/2026

Initial release.