< Summary - ZhEaIsNsAaBn.Libraries coverage (affected: 23 packages)

Information
Class: ZhEaIsNsAaBn.IntegrationTestingBases.DbSeederTables
Assembly: ZhEaIsNsAaBn.IntegrationTestingBases
File(s): /home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/TestPackages/ZhEaIsNsAaBn.IntegrationTestingBases/Utilities/DbSeederTables.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 39
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
WithSeedTables(...)100%11100%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/TestPackages/ZhEaIsNsAaBn.IntegrationTestingBases/Utilities/DbSeederTables.cs

#LineLine coverage
 1#region Usings
 2using Respawn.Graph;
 3#endregion
 4
 5namespace ZhEaIsNsAaBn.IntegrationTestingBases;
 6
 7/// <summary>
 8/// The tables of ZhEaIsNsAaBn.DbSeeder (plain names; this package doesn't reference DbSeeder). Keep them — and the seed
 9/// of the reset, so seed data applied once (e.g. by <c>Migrate()</c> with <c>UseDbSeeder</c>) survives every <c>ResetDa
 10/// </summary>
 11/// <example>
 12/// <code>
 13/// protected override Table[] TablesToIgnore => DbSeederTables.WithSeedTables( "Countries", "PaymentMethods" );
 14/// </code>
 15/// </example>
 16public static class DbSeederTables
 17{
 18    /// <summary>The seed history table: which seed migrations are applied.</summary>
 19    public const string History = "__SeedMigrationsHistory";
 20
 21    /// <summary>The append-only seed audit table.</summary>
 22    public const string Audit = "__SeedMigrationsAudit";
 23
 24
 25    /// <summary>Both DbSeeder tables.</summary>
 726    public static IReadOnlyList<string> All { get; } = [ History, Audit ];
 27
 28
 29    /// <summary>The DbSeeder tables plus the seeded tables, as Respawn tables for <c>TablesToIgnore</c>.</summary>
 30    /// <param name="seedTables">The tables that hold seed data (default schema), e.g. <c>"Countries"</c>.</param>
 31    /// <returns>The tables to keep.</returns>
 32    /// <exception cref="ArgumentNullException"><paramref name="seedTables"/> is <see langword="null"/>.</exception>
 33    public static Table[] WithSeedTables( params string[] seedTables )
 34    {
 1035        ArgumentNullException.ThrowIfNull( seedTables );
 36
 737        return [ ..All.Concat( seedTables ).Select( t => new Table( t ) ) ];
 38    }
 39}