Anarchy.Toolkit.Testing
1.0.5
See the version list below for details.
dotnet add package Anarchy.Toolkit.Testing --version 1.0.5
NuGet\Install-Package Anarchy.Toolkit.Testing -Version 1.0.5
<PackageReference Include="Anarchy.Toolkit.Testing" Version="1.0.5" />
<PackageVersion Include="Anarchy.Toolkit.Testing" Version="1.0.5" />
<PackageReference Include="Anarchy.Toolkit.Testing" />
paket add Anarchy.Toolkit.Testing --version 1.0.5
#r "nuget: Anarchy.Toolkit.Testing, 1.0.5"
#:package Anarchy.Toolkit.Testing@1.0.5
#addin nuget:?package=Anarchy.Toolkit.Testing&version=1.0.5
#tool nuget:?package=Anarchy.Toolkit.Testing&version=1.0.5
Anarchy.Toolkit.Testing
Shared test helpers, fixtures and assertions for toolkit-based applications.
dotnet add package Anarchy.Toolkit.Testing
- Base tests and fixtures on
TestCaseBase,TestCaseBase<TAppSettings>andEntityFixtureBase; useTestHelperfor common setup. - Test instrumentation with
InMemoryObserver, the in-memory measurer and Serilog sink, and their assertions. - API Gateway response assertions use AwesomeAssertions. Database, AWS messaging and web-specific helpers live in separate
Testing.*packages.
When to use it
Reference this package from test projects, not production services. It is useful for focused unit tests that need repeatable entities, a host environment or an observer without sending logs and metrics to a real backend. Use the specialized test kits when the test needs a database, messaging service or web host.
How to use it
- Derive a test class from
TestCaseBaseand pass itsFixtureObserverto the subject under test. Assert business behavior first; inspectSinkLogsorInMemoryMeasurerwhen telemetry itself is under test. - Derive fixtures from
EntityFixtureBase<T>and implementBuildDefaultFixture(). CallBuild()for defaults orBuild(new { Property = value })to vary only the scenario-specific fields. Null overrides requireoverrideWithNulls: true. - Use
TestCaseBase<TAppSettings>orTestHelper.TestSettings<TAppSettings>()for typed settings. Embedappsettings.jsonandappsettings.Development.jsonin the assembly declaring the settings type, and keep real credentials out of test resources.
See the testing guide for a test and fixture example.
See the testing conventions and package catalogue.
Releases
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 shared test bases, fixtures, request and response helpers, and in-memory observability assertions.
| Product | Versions 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. |
-
net10.0
- Amazon.Extensions.Configuration.SystemsManager (>= 7.1.1)
- Amazon.Lambda.APIGatewayEvents (>= 3.0.1)
- Amazon.Lambda.Core (>= 3.4.0)
- Amazon.Lambda.TestUtilities (>= 4.3.0)
- Anarchy.Toolkit.Configuration (>= 1.0.5)
- Anarchy.Toolkit.Core (>= 1.0.4)
- Anarchy.Toolkit.Core.Observability (>= 1.0.4)
- AwesomeAssertions (>= 9.6.0)
- AWSSDK.Core (>= 4.1.0)
- AWSSDK.Extensions.NETCore.Setup (>= 4.1.0)
- AWSSDK.KeyManagementService (>= 4.1.0)
- AWSSDK.SecretsManager (>= 4.1.1)
- Humanizer (>= 3.0.10)
- Microsoft.AspNetCore.WebUtilities (>= 10.0.15)
- Microsoft.Extensions.Caching.Memory (>= 10.0.15)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Configuration.Json (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Hosting (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.15)
- Microsoft.Identity.Client (>= 4.92.0)
- Microsoft.NET.Test.Sdk (>= 18.12.0)
- Moq (>= 4.21.0)
- Newtonsoft.Json (>= 13.0.4)
- Serilog (>= 4.4.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Spectre.Console (>= 0.57.2)
- xunit.v3.extensibility.core (>= 4.0.3)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Anarchy.Toolkit.Testing:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Testing.Oracle
Oracle integration-test fixtures: connection string, connection pool, retry/resilience policy and Unit of Work fixtures, options mapping, enum type handlers, and table reset helpers. |
|
|
Anarchy.Toolkit.Testing.Web
Web end-to-end test base (RestApiTestCaseBase exercising both the native Kestrel and AWS Lambda pipelines), a testable Lambda entry point, and HTTP request helpers. |
|
|
Anarchy.Toolkit.Testing.Postgres
PostgreSQL integration-test fixtures: connection string, connection pool, retry/resilience policy and Unit of Work fixtures, options mapping, enum type handlers, and table reset helpers. |
|
|
Anarchy.Toolkit.Testing.Mysql
MySQL integration-test fixtures, settings mapping, enum handlers and table reset helpers. |
|
|
Anarchy.Toolkit.Testing.Aws
AWS messaging test helpers (SNS/SQS helpers, typically against LocalStack, and SqsMessageFixture with gzip/zlib bodies) for message-broker integration tests. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.