docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
This commit is contained in:
@@ -8,6 +8,7 @@ namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class TwinCATSymbolBrowserTests
|
||||
{
|
||||
/// <summary>Verifies that discovery without EnableControllerBrowse only emits predeclared tags.</summary>
|
||||
[Fact]
|
||||
public async Task Discovery_without_EnableControllerBrowse_emits_only_predeclared()
|
||||
{
|
||||
@@ -36,6 +37,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
builder.Folders.ShouldNotContain(f => f.BrowseName == "Discovered");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that discovery with browse enabled adds controller symbols under Discovered folder.</summary>
|
||||
[Fact]
|
||||
public async Task Discovery_with_browse_enabled_adds_controller_symbols_under_Discovered_folder()
|
||||
{
|
||||
@@ -65,6 +67,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
builder.Variables.Select(v => v.Info.FullName).ShouldContain("GVL.Setpoint");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that browse filters out system symbols correctly.</summary>
|
||||
[Fact]
|
||||
public async Task Browse_filters_system_symbols()
|
||||
{
|
||||
@@ -95,6 +98,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
builder.Variables.Select(v => v.Info.FullName).ShouldBe(["MAIN.Real"]);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that browse skips symbols with null datatype.</summary>
|
||||
[Fact]
|
||||
public async Task Browse_skips_symbols_with_null_datatype()
|
||||
{
|
||||
@@ -122,6 +126,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
builder.Variables.Select(v => v.Info.FullName).ShouldBe(["MAIN.Counter"]);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that read-only symbols surface as ViewOnly.</summary>
|
||||
[Fact]
|
||||
public async Task ReadOnly_symbol_surfaces_ViewOnly()
|
||||
{
|
||||
@@ -148,6 +153,7 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
builder.Variables.Single().Info.SecurityClass.ShouldBe(SecurityClassification.ViewOnly);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that browse failure is non-fatal and predeclared tags still emit.</summary>
|
||||
[Fact]
|
||||
public async Task Browse_failure_is_non_fatal_predeclared_still_emits()
|
||||
{
|
||||
@@ -170,6 +176,9 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
builder.Variables.Select(v => v.BrowseName).ShouldContain("Declared");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that system symbol filter matches expected patterns.</summary>
|
||||
/// <param name="path">The symbol path to test.</param>
|
||||
/// <param name="expected">Whether the path is expected to be a system symbol.</param>
|
||||
[Theory]
|
||||
[InlineData("TwinCAT_SystemInfoVarList._AppInfo", true)]
|
||||
[InlineData("TwinCAT_RuntimeInfo.Something", true)]
|
||||
@@ -191,22 +200,68 @@ public sealed class TwinCATSymbolBrowserTests
|
||||
|
||||
private sealed class RecordingBuilder : IAddressSpaceBuilder
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the list of folders that were added to the address space.
|
||||
/// </summary>
|
||||
public List<(string BrowseName, string DisplayName)> Folders { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of variables that were added to the address space.
|
||||
/// </summary>
|
||||
public List<(string BrowseName, DriverAttributeInfo Info)> Variables { get; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Adds a folder to the address space builder.
|
||||
/// </summary>
|
||||
/// <param name="browseName">The browse name of the folder.</param>
|
||||
/// <param name="displayName">The display name of the folder.</param>
|
||||
/// <returns>This builder for method chaining.</returns>
|
||||
public IAddressSpaceBuilder Folder(string browseName, string displayName)
|
||||
{ Folders.Add((browseName, displayName)); return this; }
|
||||
|
||||
/// <summary>
|
||||
/// Adds a variable to the address space builder.
|
||||
/// </summary>
|
||||
/// <param name="browseName">The browse name of the variable.</param>
|
||||
/// <param name="displayName">The display name of the variable.</param>
|
||||
/// <param name="info">The driver attribute information for the variable.</param>
|
||||
/// <returns>A variable handle for further configuration.</returns>
|
||||
public IVariableHandle Variable(string browseName, string displayName, DriverAttributeInfo info)
|
||||
{ Variables.Add((browseName, info)); return new Handle(info.FullName); }
|
||||
|
||||
/// <summary>
|
||||
/// Adds a property to the address space builder.
|
||||
/// </summary>
|
||||
/// <param name="_">The property name (unused).</param>
|
||||
/// <param name="__">The property data type (unused).</param>
|
||||
/// <param name="___">The property value (unused).</param>
|
||||
public void AddProperty(string _, DriverDataType __, object? ___) { }
|
||||
|
||||
private sealed class Handle(string fullRef) : IVariableHandle
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the full reference of the variable.
|
||||
/// </summary>
|
||||
public string FullReference => fullRef;
|
||||
|
||||
/// <summary>
|
||||
/// Marks the variable as an alarm condition.
|
||||
/// </summary>
|
||||
/// <param name="info">The alarm condition information.</param>
|
||||
/// <returns>An alarm condition sink for event transitions.</returns>
|
||||
public IAlarmConditionSink MarkAsAlarmCondition(AlarmConditionInfo info) => new NullSink();
|
||||
}
|
||||
private sealed class NullSink : IAlarmConditionSink { public void OnTransition(AlarmEventArgs args) { } }
|
||||
|
||||
/// <summary>
|
||||
/// A null implementation of IAlarmConditionSink for test purposes.
|
||||
/// </summary>
|
||||
private sealed class NullSink : IAlarmConditionSink
|
||||
{
|
||||
/// <summary>
|
||||
/// Handles alarm transitions (no-op for tests).
|
||||
/// </summary>
|
||||
/// <param name="args">The alarm event arguments.</param>
|
||||
public void OnTransition(AlarmEventArgs args) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user