Anarchy.Toolkit.Testing.Postgres
1.1.4
See the version list below for details.
dotnet add package Anarchy.Toolkit.Testing.Postgres --version 1.1.4
NuGet\Install-Package Anarchy.Toolkit.Testing.Postgres -Version 1.1.4
<PackageReference Include="Anarchy.Toolkit.Testing.Postgres" Version="1.1.4" />
<PackageVersion Include="Anarchy.Toolkit.Testing.Postgres" Version="1.1.4" />
<PackageReference Include="Anarchy.Toolkit.Testing.Postgres" />
paket add Anarchy.Toolkit.Testing.Postgres --version 1.1.4
#r "nuget: Anarchy.Toolkit.Testing.Postgres, 1.1.4"
#:package Anarchy.Toolkit.Testing.Postgres@1.1.4
#addin nuget:?package=Anarchy.Toolkit.Testing.Postgres&version=1.1.4
#tool nuget:?package=Anarchy.Toolkit.Testing.Postgres&version=1.1.4
Anarchy.Toolkit.Testing.Postgres
PostgreSQL integration-test helpers for the toolkit's Npgsql persistence adapter.
dotnet add package Anarchy.Toolkit.Testing.Postgres
- Use
PostgresHelperorSingletonPostgresHelperfor connection, pool, resilience and unit-of-work fixtures. PostgresOptionsMappermaps options; helpers include generic enum type-handler registration and table cleanup.- Tests need a PostgreSQL instance and a schema appropriate to the consuming application.
When to use it
Use this package for integration tests that need to verify PostgreSQL queries, Dapper mappings or unit-of-work behavior against a real database. It creates fixtures using the toolkit provider; it does not launch PostgreSQL or migrate your schema.
How to use it
- Start an isolated PostgreSQL instance and prepare the test schema. Implement
IPostgresAppSettingson your settings type; policy fixtures additionally requireIResilienceAppSettings. - Create the required fixture from embedded test settings, or pass a settings instance directly:
using Anarchy.Toolkit.Testing.Postgres.Helper;
var policy = PostgresHelper.DbPolicyFixture<TestAppSettings>();
var unitOfWork = PostgresHelper.DbUnitOfWorkFixture<TestAppSettings>();
Here TestAppSettings is your own type and its declaring assembly contains the embedded test settings. Register enum handlers as needed, use the fixtures in repository tests, and clean up only dedicated test tables. SingletonPostgresHelper shares a policy; coordinate access and cleanup when tests run in parallel.
See Infrastructure.Persistence.Postgres, the testing conventions and the toolkit overview.
Releases
1.1.4
- chore(deps): update AWS SDK packages
1.1.2
- build: migrate local automation to build tooling
1.1.1
- docs: expand package guides and release histories
- chore(deps): update AWS, Polly, and xUnit packages
1.1.0
- Updated the database testing and PostgreSQL persistence dependencies alongside configurable maximum pool size support.
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced PostgreSQL integration test helpers, including a singleton variant and options mapper.
| 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.Infrastructure.Persistence.Postgres (>= 1.1.3)
- Anarchy.Toolkit.Testing (>= 1.0.5)
- Anarchy.Toolkit.Testing.Db (>= 1.1.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)
- Dapper (= 2.1.79)
- 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)
- Npgsql (>= 10.0.3)
- Polly.Core (>= 8.9.1)
- Serilog (>= 4.4.0)
- Serilog.Sinks.Console (>= 6.1.1)
- Spectre.Console (>= 0.57.2)
- xunit.v3.extensibility.core (>= 4.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.