Anarchy.Toolkit.Testing.Mysql
1.1.2
See the version list below for details.
dotnet add package Anarchy.Toolkit.Testing.Mysql --version 1.1.2
NuGet\Install-Package Anarchy.Toolkit.Testing.Mysql -Version 1.1.2
<PackageReference Include="Anarchy.Toolkit.Testing.Mysql" Version="1.1.2" />
<PackageVersion Include="Anarchy.Toolkit.Testing.Mysql" Version="1.1.2" />
<PackageReference Include="Anarchy.Toolkit.Testing.Mysql" />
paket add Anarchy.Toolkit.Testing.Mysql --version 1.1.2
#r "nuget: Anarchy.Toolkit.Testing.Mysql, 1.1.2"
#:package Anarchy.Toolkit.Testing.Mysql@1.1.2
#addin nuget:?package=Anarchy.Toolkit.Testing.Mysql&version=1.1.2
#tool nuget:?package=Anarchy.Toolkit.Testing.Mysql&version=1.1.2
Anarchy.Toolkit.Testing.Mysql
MySQL integration-test helpers for the toolkit's MySqlConnector persistence adapter.
dotnet add package Anarchy.Toolkit.Testing.Mysql
- Use
MysqlHelperorSingletonMysqlHelperfor database fixtures andMysqlOptionsMapperfor options mapping. IMysqlAppSettingssupports settings-based fixtures; helpers also provide enum handlers and table cleanup.- Tests need a MySQL instance and an application schema. MySQL
TRUNCATEresets auto-increment and may fail for referenced tables.
When to use it
Use this package in integration tests that must verify actual MySQL SQL, mappings or transaction behavior. It creates toolkit persistence fixtures against a configured server; it does not start MySQL or create application tables.
How to use it
- Provision an isolated MySQL database and schema. Implement
IMysqlAppSettingson your test settings type; also implementIResilienceAppSettingswhen creating a resilience policy fixture. - Use
MysqlHelper.DbPolicyFixture<TAppSettings>()or pass a settings instance directly; useDbUnitOfWorkFixturefor unit-of-work tests. The generic overload reads embedded test settings from the settings type's assembly. - Register enum handlers when needed, arrange data, execute the repository and assert results. Use the shared database cleanup helpers only on trusted test tables.
SingletonMysqlHelper can share a policy across tests; manage shared state and parallel cleanup carefully. Use a disposable test database, not production credentials.
See Infrastructure.Persistence.Mysql, the MySQL notes and the testing conventions.
Releases
1.1.2
- build: migrate local automation to NUKE
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 MySQL persistence dependencies alongside configurable maximum pool size support.
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced MySQL 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.Mysql (>= 1.1.2)
- Anarchy.Toolkit.Testing (>= 1.0.3)
- Anarchy.Toolkit.Testing.Db (>= 1.1.2)
- AwesomeAssertions (>= 9.6.0)
- AWSSDK.Core (>= 4.0.102.19)
- AWSSDK.Extensions.NETCore.Setup (>= 4.0.102.10)
- AWSSDK.KeyManagementService (>= 4.0.101.4)
- AWSSDK.SecretsManager (>= 4.0.100.25)
- Dapper (= 2.1.79)
- Humanizer (>= 3.0.10)
- Microsoft.AspNetCore.WebUtilities (>= 10.0.14)
- Microsoft.Extensions.Caching.Memory (>= 10.0.14)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Configuration.Json (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Hosting (>= 10.0.14)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.14)
- Microsoft.Identity.Client (>= 4.92.0)
- Microsoft.NET.Test.Sdk (>= 18.11.0)
- Moq (>= 4.21.0)
- MySqlConnector (>= 2.6.2)
- Newtonsoft.Json (>= 13.0.4)
- 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.