Files
ScadaBridge/tests/ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests/Delivery/DeliveryOutcomeTests.cs
T
Joseph Doherty 513fa1aa16 docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)
Comment/XML-doc changes only:
- add summaries to ~10k test methods, fixtures, fakes and helpers
  (+ <param> on theories, <returns> on async Task methods,
  <inheritdoc/> on interface implementations the checker can resolve)
- strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N,
  #NN, Component-0NN) from comments, keeping the explanatory text;
  reword false positives in comments only
- real docs on fakes implementing BCL/library interfaces
  (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime)
- reword the last 5 src/ false positives (CWE-1236, failures-1,
  year-0001, M365)

Only non-comment edits: four one-line nested classes split across lines
so members can carry docs. Build 0 errors / 0 warnings.
2026-10-07 15:05:49 -04:00

40 lines
1.3 KiB
C#

using ZB.MOM.WW.ScadaBridge.NotificationOutbox.Delivery;
namespace ZB.MOM.WW.ScadaBridge.NotificationOutbox.Tests.Delivery;
public class DeliveryOutcomeTests
{
/// <summary>Verifies that a success outcome carries the resolved targets and no error.</summary>
[Fact]
public void Success_SetsResolvedTargets_AndNoError()
{
var outcome = DeliveryOutcome.Success("targets");
Assert.Equal(DeliveryResult.Success, outcome.Result);
Assert.Equal("targets", outcome.ResolvedTargets);
Assert.Null(outcome.Error);
}
/// <summary>Verifies that a transient outcome carries an error and no resolved targets.</summary>
[Fact]
public void Transient_SetsError_AndNoResolvedTargets()
{
var outcome = DeliveryOutcome.Transient("e");
Assert.Equal(DeliveryResult.TransientFailure, outcome.Result);
Assert.Equal("e", outcome.Error);
Assert.Null(outcome.ResolvedTargets);
}
/// <summary>Verifies that a permanent outcome carries an error and no resolved targets.</summary>
[Fact]
public void Permanent_SetsError_AndNoResolvedTargets()
{
var outcome = DeliveryOutcome.Permanent("e");
Assert.Equal(DeliveryResult.PermanentFailure, outcome.Result);
Assert.Equal("e", outcome.Error);
Assert.Null(outcome.ResolvedTargets);
}
}