Files
ScadaBridge/tests/ZB.MOM.WW.ScadaBridge.StoreAndForward.Tests/StoreAndForwardOptionsTests.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

42 lines
1.5 KiB
C#

namespace ZB.MOM.WW.ScadaBridge.StoreAndForward.Tests;
/// <summary>
/// Tests for StoreAndForwardOptions defaults and configuration.
/// </summary>
public class StoreAndForwardOptionsTests
{
/// <summary>Verifies that the default options have reasonable values.</summary>
[Fact]
public void DefaultOptions_HasReasonableDefaults()
{
var options = new StoreAndForwardOptions();
Assert.Equal("./data/store-and-forward.db", options.SqliteDbPath);
Assert.Equal(TimeSpan.FromSeconds(30), options.DefaultRetryInterval);
Assert.Equal(50, options.DefaultMaxRetries);
Assert.Equal(TimeSpan.FromSeconds(10), options.RetryTimerInterval);
}
/// <summary>Verifies that the options can be customized.</summary>
[Fact]
public void Options_CanBeCustomized()
{
var options = new StoreAndForwardOptions
{
SqliteDbPath = "/custom/path.db",
DefaultRetryInterval = TimeSpan.FromMinutes(5),
DefaultMaxRetries = 100,
RetryTimerInterval = TimeSpan.FromSeconds(30)
};
Assert.Equal("/custom/path.db", options.SqliteDbPath);
Assert.Equal(TimeSpan.FromMinutes(5), options.DefaultRetryInterval);
Assert.Equal(100, options.DefaultMaxRetries);
}
/// <summary>Verifies that the sweep batch limit defaults to 500.</summary>
[Fact]
public void SweepBatchLimit_Defaults_To_500() =>
Assert.Equal(500, new StoreAndForwardOptions().SweepBatchLimit);
}