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:
@@ -13,6 +13,7 @@ namespace ZB.MOM.WW.ScadaBridge.Communication.Tests.Grpc;
|
||||
|
||||
public class StreamRelayActorTests : TestKit
|
||||
{
|
||||
/// <summary>Verifies that an attribute value change is relayed as a proto event.</summary>
|
||||
[Fact]
|
||||
public void RelaysAttributeValueChanged_ToProtoEvent()
|
||||
{
|
||||
@@ -49,6 +50,7 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.Equal(Timestamp.FromDateTimeOffset(timestamp), attr.Timestamp);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an alarm state change is relayed as a proto event.</summary>
|
||||
[Fact]
|
||||
public void RelaysAlarmStateChanged_ToProtoEvent()
|
||||
{
|
||||
@@ -113,10 +115,11 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.Equal("90", alarm.LimitValue);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the native binding linkage of an alarm state change survives a full round trip.</summary>
|
||||
[Fact]
|
||||
public void RelaysAlarmStateChanged_NativeBindingLinkage_SurvivesFullRoundTrip()
|
||||
{
|
||||
// DV-1: the native source-binding canonical name must pack into AlarmStateUpdate
|
||||
// The native source-binding canonical name must pack into AlarmStateUpdate
|
||||
// (StreamRelayActor) and unpack back out (SiteStreamGrpcClient.ConvertToDomainEvent)
|
||||
// — the full cross-process round trip for a real (non-placeholder) native alarm.
|
||||
var channel = Channel.CreateUnbounded<SiteStreamEvent>();
|
||||
@@ -159,6 +162,7 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.False(roundTripped.IsConfiguredPlaceholder);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the acknowledgement time of an alarm state change survives a full round trip.</summary>
|
||||
[Fact]
|
||||
public void RelaysAlarmStateChanged_AckTime_SurvivesFullRoundTrip()
|
||||
{
|
||||
@@ -222,6 +226,7 @@ public class StreamRelayActorTests : TestKit
|
||||
return protoEvent!;
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an alarm state change for a configured placeholder is dropped.</summary>
|
||||
[Fact]
|
||||
public void DropsAlarmStateChanged_WhenIsConfiguredPlaceholder()
|
||||
{
|
||||
@@ -255,6 +260,7 @@ public class StreamRelayActorTests : TestKit
|
||||
"Placeholder AlarmStateChanged must not be relayed to the gRPC stream");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the correlation id is set on all relayed events.</summary>
|
||||
[Fact]
|
||||
public void SetsCorrelationId_OnAllEvents()
|
||||
{
|
||||
@@ -282,6 +288,7 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.All(events, e => Assert.Equal(correlationId, e.CorrelationId));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an event is dropped when the channel is full.</summary>
|
||||
[Fact]
|
||||
public void DropsEvent_WhenChannelFull()
|
||||
{
|
||||
@@ -311,6 +318,9 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.False(channel.Reader.TryRead(out _));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a quality string is mapped to the matching proto enum value.</summary>
|
||||
/// <param name="qualityString">The quality string on the domain event.</param>
|
||||
/// <param name="expectedProto">The expected proto quality value.</param>
|
||||
[Theory]
|
||||
[InlineData("Good", Quality.Good)]
|
||||
[InlineData("Uncertain", Quality.Uncertain)]
|
||||
@@ -332,6 +342,7 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.Equal(expectedProto, evt.AttributeChanged.Quality);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null value is mapped to an empty string.</summary>
|
||||
[Fact]
|
||||
public void NullValue_MapsToEmptyString()
|
||||
{
|
||||
@@ -355,6 +366,7 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.Equal("", evt.AttributeChanged.Value);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a list value is encoded as a JSON array.</summary>
|
||||
[Fact]
|
||||
public void ListValue_EncodesAsJsonArray()
|
||||
{
|
||||
@@ -372,6 +384,7 @@ public class StreamRelayActorTests : TestKit
|
||||
Assert.Equal("[\"a\",\"b\"]", evt.AttributeChanged.Value);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a scalar string value passes through unchanged.</summary>
|
||||
[Fact]
|
||||
public void ScalarStringValue_PassesThroughUnchanged()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user