< Summary

Information
Class: AsiBackbone.Core.Outbox.GovernanceOutboxClaimTransitionResult
Assembly: AsiBackbone.Core
File(s): /home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.Core/Outbox/GovernanceOutboxClaimTransitionResult.cs
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 47
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%22100%
get_Entry()100%11100%
get_Outcome()100%11100%
get_IsApplied()100%11100%
Create(...)100%11100%

File(s)

/home/runner/work/AsiBackbone/AsiBackbone/src/AsiBackbone.Core/Outbox/GovernanceOutboxClaimTransitionResult.cs

#LineLine coverage
 1namespace AsiBackbone.Core.Outbox;
 2
 3/// <summary>
 4/// Represents the caller-visible result of a claimed outbox transition attempt.
 5/// </summary>
 6public sealed class GovernanceOutboxClaimTransitionResult
 7{
 268    private GovernanceOutboxClaimTransitionResult(
 269        GovernanceOutboxEntry entry,
 2610        GovernanceOutboxClaimTransitionOutcome outcome)
 11    {
 2612        ArgumentNullException.ThrowIfNull(entry);
 13
 2414        if (!Enum.IsDefined(outcome))
 15        {
 216            throw new ArgumentOutOfRangeException(nameof(outcome), outcome, "Claim transition outcome must be defined.")
 17        }
 18
 2219        Entry = entry;
 2220        Outcome = outcome;
 2221    }
 22
 23    /// <summary>
 24    /// Gets the durable entry observed after the transition attempt, or the caller's last safe snapshot when the row is
 25    /// </summary>
 3426    public GovernanceOutboxEntry Entry { get; }
 27
 28    /// <summary>
 29    /// Gets the explicit transition outcome.
 30    /// </summary>
 4431    public GovernanceOutboxClaimTransitionOutcome Outcome { get; }
 32
 33    /// <summary>
 34    /// Gets a value indicating whether this invocation persisted the requested transition.
 35    /// </summary>
 2236    public bool IsApplied => Outcome is GovernanceOutboxClaimTransitionOutcome.Applied;
 37
 38    /// <summary>
 39    /// Creates a claimed transition result.
 40    /// </summary>
 41    public static GovernanceOutboxClaimTransitionResult Create(
 42        GovernanceOutboxEntry entry,
 43        GovernanceOutboxClaimTransitionOutcome outcome)
 44    {
 2645        return new GovernanceOutboxClaimTransitionResult(entry, outcome);
 46    }
 47}