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

Information
Class: ZhEaIsNsAaBn.DbSeeder.SeedRollbackPlan
Assembly: ZhEaIsNsAaBn.DbSeeder
File(s): /home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.DbSeeder/SeedRollbackPlan.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 33
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
get_CanRollBack()100%11100%

File(s)

/home/runner/work/ZhEaIsNsAaBn.Libraries.V1/ZhEaIsNsAaBn.Libraries.V1/src/DataBasePackages/ZhEaIsNsAaBn.DbSeeder/SeedRollbackPlan.cs

#LineLine coverage
 1namespace ZhEaIsNsAaBn.DbSeeder;
 2
 3/// <summary>
 4/// What rolling back would do, from a dry run (every step executed in a transaction that is then rolled back), so the c
 5/// blockers are the real ones. Nothing is changed.
 6/// </summary>
 7public sealed class SeedRollbackPlan
 8{
 9    /// <summary>The migrations that would be rolled back, newest first.</summary>
 10    public required IReadOnlyList<string> Migrations { get; init; }
 11
 12    /// <summary>Rows per migration, table and operation.</summary>
 13    public required IReadOnlyList<SeedRollbackStep> Steps { get; init; }
 14
 15    /// <summary>Rows of other tables that reference seed rows a real delete would remove. Not empty → the rollback fail
 16    public required IReadOnlyList<SeedBlocker> Blockers { get; init; }
 17
 18    /// <summary>Warnings, e.g. <c>ChecksumMismatch</c> (<see cref="Severity.Low"/>).</summary>
 19    public required IReadOnlyList<Error> Warnings { get; init; }
 20
 21
 22    /// <summary>
 23    /// For a forced plan (design tools only): every dependent table a forced delete would empty first, bottom-up. Empty
 24    /// </summary>
 25    public IReadOnlyList<SeedForceNode> ForceTree { get; init; } = [];
 26
 27    /// <summary>For a forced plan: why a forced delete is refused (cycle, self-reference, no primary key); <see langwor
 28    public string? ForceRefusal { get; init; }
 29
 30
 31    /// <summary>Whether the rollback would succeed: no blockers.</summary>
 3532    public bool CanRollBack => Blockers.Count == 0;
 33}

Methods/Properties

get_CanRollBack()