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.
This commit is contained in:
@@ -8,7 +8,7 @@ using ZB.MOM.WW.ScadaBridge.HealthMonitoring;
|
||||
namespace ZB.MOM.WW.ScadaBridge.IntegrationTests;
|
||||
|
||||
/// <summary>
|
||||
/// WP-8 (Phase 8): Observability validation.
|
||||
/// Observability validation.
|
||||
/// Verifies structured logs contain SiteId/NodeHostname/NodeRole,
|
||||
/// correlation IDs flow through request chains, and health dashboard shows all metric types.
|
||||
/// </summary>
|
||||
@@ -16,11 +16,14 @@ public class ObservabilityTests : IClassFixture<ScadaBridgeWebApplicationFactory
|
||||
{
|
||||
private readonly ScadaBridgeWebApplicationFactory _factory;
|
||||
|
||||
/// <summary>Initializes the test class with the shared web application factory.</summary>
|
||||
/// <param name="factory">The shared web application factory.</param>
|
||||
public ObservabilityTests(ScadaBridgeWebApplicationFactory factory)
|
||||
{
|
||||
_factory = factory;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the Serilog output template includes the required node fields.</summary>
|
||||
[Fact]
|
||||
public void StructuredLog_SerilogTemplate_IncludesRequiredFields()
|
||||
{
|
||||
@@ -33,6 +36,7 @@ public class ObservabilityTests : IClassFixture<ScadaBridgeWebApplicationFactory
|
||||
Assert.Contains("{Level", template);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the Serilog enrichment is configured with the site id.</summary>
|
||||
[Fact]
|
||||
public void SerilogEnrichment_SiteId_Configured()
|
||||
{
|
||||
@@ -48,6 +52,7 @@ public class ObservabilityTests : IClassFixture<ScadaBridgeWebApplicationFactory
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that every message contract carries a correlation id.</summary>
|
||||
[Fact]
|
||||
public void CorrelationId_MessageContracts_AllHaveCorrelationId()
|
||||
{
|
||||
@@ -75,6 +80,7 @@ public class ObservabilityTests : IClassFixture<ScadaBridgeWebApplicationFactory
|
||||
Assert.Equal("cmd-456", disableCmd.CommandId);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that every metric type is represented in the site health report.</summary>
|
||||
[Fact]
|
||||
public void HealthDashboard_AllMetricTypes_RepresentedInReport()
|
||||
{
|
||||
@@ -128,6 +134,7 @@ public class ObservabilityTests : IClassFixture<ScadaBridgeWebApplicationFactory
|
||||
Assert.Equal(5, report.DeadLetterCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a registered site is marked online by the health aggregator.</summary>
|
||||
[Fact]
|
||||
public void HealthAggregator_SiteRegistration_MarkedOnline()
|
||||
{
|
||||
@@ -162,6 +169,7 @@ public class ObservabilityTests : IClassFixture<ScadaBridgeWebApplicationFactory
|
||||
Assert.Equal(3, state.LatestReport!.ScriptErrorCount);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that health report sequence numbers increase monotonically.</summary>
|
||||
[Fact]
|
||||
public void HealthReport_SequenceNumbers_Monotonic()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user