513fa1aa16
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.
56 lines
2.3 KiB
C#
56 lines
2.3 KiB
C#
using System.Reflection;
|
|
using ZB.MOM.WW.ScadaBridge.Communication.Actors;
|
|
|
|
namespace ZB.MOM.WW.ScadaBridge.Communication.Tests.Grpc;
|
|
|
|
/// <summary>
|
|
/// Regression tests ensuring that the old ClusterClient-based debug streaming
|
|
/// path is not reintroduced. Debug streaming now flows through gRPC.
|
|
///
|
|
/// Note: The DebugStreamEvent type-does-not-exist check lives in
|
|
/// ZB.MOM.WW.ScadaBridge.Commons.Tests/ArchitecturalConstraintTests.cs and is not
|
|
/// duplicated here.
|
|
/// </summary>
|
|
public class NoClusterClientStreamingRegressionTests
|
|
{
|
|
/// <summary>Verifies that <c>CentralCommunicationActor</c> has no <c>HandleDebugStreamEvent</c> member.</summary>
|
|
[Fact]
|
|
public void CentralCommunicationActor_DoesNotHave_HandleDebugStreamEvent()
|
|
{
|
|
var type = typeof(CentralCommunicationActor);
|
|
var method = type.GetMethod("HandleDebugStreamEvent",
|
|
BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
|
|
Assert.Null(method);
|
|
}
|
|
|
|
/// <summary>Verifies that <c>SiteCommunicationActor</c> has no <c>HandleDebugStreamEvent</c> member.</summary>
|
|
[Fact]
|
|
public void SiteCommunicationActor_DoesNotHave_HandleDebugStreamEvent()
|
|
{
|
|
var type = typeof(SiteCommunicationActor);
|
|
var method = type.GetMethod("HandleDebugStreamEvent",
|
|
BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
|
|
Assert.Null(method);
|
|
}
|
|
|
|
/// <summary>Verifies that <c>CentralCommunicationActor</c> has no <c>ForwardDebugStreamEvent</c> member.</summary>
|
|
[Fact]
|
|
public void CentralCommunicationActor_DoesNotHave_ForwardDebugStreamEvent()
|
|
{
|
|
var type = typeof(CentralCommunicationActor);
|
|
var method = type.GetMethod("ForwardDebugStreamEvent",
|
|
BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
|
|
Assert.Null(method);
|
|
}
|
|
|
|
/// <summary>Verifies that the Communication assembly contains no <c>DebugStreamEvent</c> type.</summary>
|
|
[Fact]
|
|
public void Communication_Assembly_DoesNotContain_DebugStreamEvent_Type()
|
|
{
|
|
// DebugStreamEvent should not exist in the Communication assembly either
|
|
var assembly = typeof(CentralCommunicationActor).Assembly;
|
|
var type = assembly.GetTypes().FirstOrDefault(t => t.Name == "DebugStreamEvent");
|
|
Assert.Null(type);
|
|
}
|
|
}
|