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

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:
Joseph Doherty
2026-05-28 08:10:17 -04:00
parent f9fc7dd2e1
commit 64e3fbe035
756 changed files with 9876 additions and 96 deletions
@@ -9,6 +9,7 @@ namespace ZB.MOM.WW.OtOpcUa.Core.Tests.OpcUa;
[Trait("Category", "Unit")]
public sealed class EquipmentNodeWalkerTests
{
/// <summary>Verifies that walking empty content emits no nodes.</summary>
[Fact]
public void Walk_EmptyContent_EmitsNothing()
{
@@ -18,6 +19,7 @@ public sealed class EquipmentNodeWalkerTests
rec.Children.ShouldBeEmpty();
}
/// <summary>Verifies that walking emits Area, Line, and Equipment folders in unsorted order.</summary>
[Fact]
public void Walk_EmitsArea_Line_Equipment_Folders_In_UnsOrder()
{
@@ -36,6 +38,7 @@ public sealed class EquipmentNodeWalkerTests
warsaw.Children[0].Children.Select(c => c.BrowseName).ShouldBe(["oven-3"]);
}
/// <summary>Verifies that walking adds five identifier properties on equipment nodes, skipping null ZTag and SAPID.</summary>
[Fact]
public void Walk_AddsFiveIdentifierProperties_OnEquipmentNode_Skipping_NullZTagSapid()
{
@@ -61,6 +64,7 @@ public sealed class EquipmentNodeWalkerTests
equipmentNode.Properties.First(p => p.BrowseName == "EquipmentUuid").Value.ShouldBe(uuid.ToString());
}
/// <summary>Verifies that walking adds ZTag and SAPID properties when present.</summary>
[Fact]
public void Walk_Adds_ZTag_And_SAPID_When_Present()
{
@@ -78,6 +82,7 @@ public sealed class EquipmentNodeWalkerTests
equipmentNode.Properties.First(p => p.BrowseName == "SAPID").Value.ShouldBe("10000042");
}
/// <summary>Verifies that walking materializes an Identification subfolder when any identification field is present.</summary>
[Fact]
public void Walk_Materializes_Identification_Subfolder_When_AnyFieldPresent()
{
@@ -97,6 +102,7 @@ public sealed class EquipmentNodeWalkerTests
identification.Properties.Select(p => p.BrowseName).ShouldContain("Model");
}
/// <summary>Verifies that walking omits the Identification subfolder when all identification fields are null.</summary>
[Fact]
public void Walk_Omits_Identification_Subfolder_When_AllFieldsNull()
{
@@ -111,6 +117,7 @@ public sealed class EquipmentNodeWalkerTests
equipmentNode.Children.ShouldNotContain(c => c.BrowseName == "Identification");
}
/// <summary>Verifies that walking emits a variable for each bound tag under equipment.</summary>
[Fact]
public void Walk_Emits_Variable_Per_BoundTag_Under_Equipment()
{
@@ -132,6 +139,7 @@ public sealed class EquipmentNodeWalkerTests
equipmentNode.Variables.First(v => v.BrowseName == "Setpoint").AttributeInfo.DriverDataType.ShouldBe(DriverDataType.Float32);
}
/// <summary>Verifies that walking falls back to String type for unparseable data types.</summary>
[Fact]
public void Walk_FallsBack_To_String_For_Unparseable_DataType()
{
@@ -147,6 +155,7 @@ public sealed class EquipmentNodeWalkerTests
variable.AttributeInfo.DriverDataType.ShouldBe(DriverDataType.String);
}
/// <summary>Verifies that walking emits virtual tag variables with Virtual source discriminator.</summary>
[Fact]
public void Walk_Emits_VirtualTag_Variables_With_Virtual_Source_Discriminator()
{
@@ -173,6 +182,7 @@ public sealed class EquipmentNodeWalkerTests
v.AttributeInfo.DriverDataType.ShouldBe(DriverDataType.Float32);
}
/// <summary>Verifies that walking emits scripted alarm variables with ScriptedAlarm source and IsAlarm flag.</summary>
[Fact]
public void Walk_Emits_ScriptedAlarm_Variables_With_ScriptedAlarm_Source_And_IsAlarm()
{
@@ -199,6 +209,7 @@ public sealed class EquipmentNodeWalkerTests
v.AttributeInfo.DriverDataType.ShouldBe(DriverDataType.Boolean);
}
/// <summary>Verifies that walking skips disabled virtual tags and alarms.</summary>
[Fact]
public void Walk_Skips_Disabled_VirtualTags_And_Alarms()
{
@@ -226,6 +237,7 @@ public sealed class EquipmentNodeWalkerTests
rec.Children[0].Children[0].Children[0].Variables.ShouldBeEmpty();
}
/// <summary>Verifies that walking with null virtual tags and scripted alarms is safe.</summary>
[Fact]
public void Walk_Null_VirtualTags_And_ScriptedAlarms_Is_Safe()
{
@@ -240,6 +252,7 @@ public sealed class EquipmentNodeWalkerTests
rec.Children[0].Children[0].Children[0].Variables.ShouldBeEmpty();
}
/// <summary>Verifies that driver tag default NodeSourceKind is Driver.</summary>
[Fact]
public void Driver_tag_default_NodeSourceKind_is_Driver()
{
@@ -258,6 +271,7 @@ public sealed class EquipmentNodeWalkerTests
v.AttributeInfo.ScriptedAlarmId.ShouldBeNull();
}
/// <summary>Verifies that ExtractFullName unwraps a JSON object with FullName field.</summary>
[Fact]
public void ExtractFullName_unwraps_json_object_with_FullName_field()
{
@@ -266,6 +280,7 @@ public sealed class EquipmentNodeWalkerTests
.ShouldBe("MESReceiver_001.MoveInBatchID");
}
/// <summary>Verifies that ExtractFullName handles S7-style extra fields.</summary>
[Fact]
public void ExtractFullName_handles_S7_style_extra_fields()
{
@@ -274,6 +289,7 @@ public sealed class EquipmentNodeWalkerTests
.ShouldBe("DB1_DBW0");
}
/// <summary>Verifies that ExtractFullName returns raw string when input is not JSON.</summary>
[Fact]
public void ExtractFullName_returns_raw_when_not_json()
{
@@ -282,6 +298,7 @@ public sealed class EquipmentNodeWalkerTests
EquipmentNodeWalker.ExtractFullName("raw-tag-ref").ShouldBe("raw-tag-ref");
}
/// <summary>Verifies that ExtractFullName returns raw string when JSON is missing FullName field.</summary>
[Fact]
public void ExtractFullName_returns_raw_when_json_missing_FullName_field()
{
@@ -289,6 +306,7 @@ public sealed class EquipmentNodeWalkerTests
.ShouldBe("{\"Address\":\"DB1.DBW0\"}");
}
/// <summary>Verifies that driver tag FullName passes through from TagConfig JSON.</summary>
[Fact]
public void Driver_tag_FullName_passes_through_from_TagConfig_json()
{
@@ -347,13 +365,21 @@ public sealed class EquipmentNodeWalkerTests
// ----- recording IAddressSpaceBuilder -----
/// <summary>Test implementation of IAddressSpaceBuilder that records calls.</summary>
private sealed class RecordingBuilder(string browseName) : IAddressSpaceBuilder
{
/// <summary>Gets the browse name of this node.</summary>
public string BrowseName { get; } = browseName;
/// <summary>Gets the list of child nodes.</summary>
public List<RecordingBuilder> Children { get; } = new();
/// <summary>Gets the list of variables.</summary>
public List<RecordingVariable> Variables { get; } = new();
/// <summary>Gets the list of properties.</summary>
public List<RecordingProperty> Properties { get; } = new();
/// <summary>Creates a folder child node.</summary>
/// <param name="name">The browse name of the folder.</param>
/// <param name="_">The display name (unused).</param>
public IAddressSpaceBuilder Folder(string name, string _)
{
var child = new RecordingBuilder(name);
@@ -361,6 +387,10 @@ public sealed class EquipmentNodeWalkerTests
return child;
}
/// <summary>Creates a variable node.</summary>
/// <param name="name">The browse name of the variable.</param>
/// <param name="_">The display name (unused).</param>
/// <param name="attr">The attribute information for the variable.</param>
public IVariableHandle Variable(string name, string _, DriverAttributeInfo attr)
{
var v = new RecordingVariable(name, attr);
@@ -368,15 +398,24 @@ public sealed class EquipmentNodeWalkerTests
return v;
}
/// <summary>Adds a property to the node.</summary>
/// <param name="name">The browse name of the property.</param>
/// <param name="_">The data type (unused).</param>
/// <param name="value">The value of the property.</param>
public void AddProperty(string name, DriverDataType _, object? value) =>
Properties.Add(new RecordingProperty(name, value));
}
/// <summary>Recorded property for test verification.</summary>
private sealed record RecordingProperty(string BrowseName, object? Value);
/// <summary>Recorded variable for test verification.</summary>
private sealed record RecordingVariable(string BrowseName, DriverAttributeInfo AttributeInfo) : IVariableHandle
{
/// <summary>Gets the full reference of the variable.</summary>
public string FullReference => AttributeInfo.FullName;
/// <summary>Marks the variable as an alarm condition.</summary>
/// <param name="info">The alarm condition information.</param>
public IAlarmConditionSink MarkAsAlarmCondition(AlarmConditionInfo info) => throw new NotSupportedException();
}
}
@@ -9,20 +9,35 @@ namespace ZB.MOM.WW.OtOpcUa.Core.Tests.OpcUa;
[Trait("Category", "Unit")]
public sealed class IdentificationFolderBuilderTests
{
/// <summary>Records folder and property additions for test verification.</summary>
private sealed class RecordingBuilder : IAddressSpaceBuilder
{
/// <summary>Gets or sets the list of added folders.</summary>
public List<(string BrowseName, string DisplayName)> Folders { get; } = [];
/// <summary>Gets or sets the list of added properties.</summary>
public List<(string BrowseName, DriverDataType DataType, object? Value)> Properties { get; } = [];
/// <summary>Records a folder and returns this builder for chaining.</summary>
/// <param name="browseName">The browse name of the folder.</param>
/// <param name="displayName">The display name of the folder.</param>
public IAddressSpaceBuilder Folder(string browseName, string displayName)
{
Folders.Add((browseName, displayName));
return this; // flat recording — identification fields land in the same bucket
}
/// <summary>Not supported in test context.</summary>
/// <param name="browseName">The browse name of the variable.</param>
/// <param name="displayName">The display name of the variable.</param>
/// <param name="attributeInfo">The attribute information.</param>
public IVariableHandle Variable(string browseName, string displayName, DriverAttributeInfo attributeInfo)
=> throw new NotSupportedException("Identification fields use AddProperty, not Variable");
/// <summary>Records a property addition.</summary>
/// <param name="browseName">The browse name of the property.</param>
/// <param name="dataType">The data type of the property.</param>
/// <param name="value">The property value.</param>
public void AddProperty(string browseName, DriverDataType dataType, object? value)
=> Properties.Add((browseName, dataType, value));
}
@@ -54,12 +69,14 @@ public sealed class IdentificationFolderBuilderTests
DeviceManualUri = "https://siemens.example/manual",
};
/// <summary>Verifies that HasAnyFields returns false when all fields are null.</summary>
[Fact]
public void HasAnyFields_AllNull_ReturnsFalse()
{
IdentificationFolderBuilder.HasAnyFields(EmptyEquipment()).ShouldBeFalse();
}
/// <summary>Verifies that HasAnyFields returns true when at least one field is non-null.</summary>
[Fact]
public void HasAnyFields_OneNonNull_ReturnsTrue()
{
@@ -68,6 +85,7 @@ public sealed class IdentificationFolderBuilderTests
IdentificationFolderBuilder.HasAnyFields(eq).ShouldBeTrue();
}
/// <summary>Verifies that Build returns null and emits no folder when all fields are null.</summary>
[Fact]
public void Build_AllNull_ReturnsNull_AndDoesNotEmit_Folder()
{
@@ -80,6 +98,7 @@ public sealed class IdentificationFolderBuilderTests
builder.Properties.ShouldBeEmpty();
}
/// <summary>Verifies that Build emits all nine fields when fully populated.</summary>
[Fact]
public void Build_FullyPopulated_EmitsAllNineFields()
{
@@ -98,6 +117,7 @@ public sealed class IdentificationFolderBuilderTests
"property order matches decision #139 exactly");
}
/// <summary>Verifies that Build emits only non-null fields.</summary>
[Fact]
public void Build_OnlyNonNull_Are_Emitted()
{
@@ -114,6 +134,7 @@ public sealed class IdentificationFolderBuilderTests
["Manufacturer", "SerialNumber", "YearOfConstruction"]);
}
/// <summary>Verifies that YearOfConstruction maps short to Int32 DriverDataType.</summary>
[Fact]
public void YearOfConstruction_Maps_Short_To_Int32_DriverDataType()
{
@@ -128,6 +149,7 @@ public sealed class IdentificationFolderBuilderTests
prop.Value.ShouldBe(2023, "short is widened to int for OPC UA Int32 representation");
}
/// <summary>Verifies that string values round-trip through Build.</summary>
[Fact]
public void Build_StringValues_RoundTrip()
{
@@ -140,6 +162,7 @@ public sealed class IdentificationFolderBuilderTests
builder.Properties.Single(p => p.BrowseName == "DeviceManualUri").Value.ShouldBe("https://siemens.example/manual");
}
/// <summary>Verifies that field names match decision 139 exactly.</summary>
[Fact]
public void FieldNames_Match_Decision139_Exactly()
{
@@ -150,6 +173,7 @@ public sealed class IdentificationFolderBuilderTests
"ManufacturerUri", "DeviceManualUri"]);
}
/// <summary>Verifies that the folder name is Identification.</summary>
[Fact]
public void FolderName_Is_Identification()
{