Anarchy.Toolkit.Testing.Mysql 1.1.3

Suggested Alternatives

Anarchy.Toolkit.Testing.Db.Mysql

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

Anarchy.Toolkit.Testing.Mysql

MySQL integration-test helpers for the toolkit's MySqlConnector persistence adapter.

dotnet add package Anarchy.Toolkit.Testing.Mysql
  • Use MysqlHelper or SingletonMysqlHelper for database fixtures and MysqlOptionsMapper for options mapping.
  • IMysqlAppSettings supports settings-based fixtures; helpers also provide enum handlers and table cleanup.
  • Tests need a MySQL instance and an application schema. MySQL TRUNCATE resets 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

  1. Provision an isolated MySQL database and schema. Implement IMysqlAppSettings on your test settings type; also implement IResilienceAppSettings when creating a resilience policy fixture.
  2. Use MysqlHelper.DbPolicyFixture<TAppSettings>() or pass a settings instance directly; use DbUnitOfWorkFixture for unit-of-work tests. The generic overload reads embedded test settings from the settings type's assembly.
  3. 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.3

  • chore(docs): Update release notes

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 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.

Initial release.