063005fefa
- DriverTagPicker shell: modal chrome + per-driver picker body rendered as ChildContent. - 9 picker bodies (Modbus/AbCip/AbLegacy/S7/TwinCat/FOCAS/ OpcUaClient/Galaxy/Historian.Wonderware). 5 have computed builder logic + unit tests; 4 are free-text passthroughs (live browse for OPC UA + Galaxy is a documented follow-up). - Each typed driver page gets a "Pick address" button that opens the modal with the matching body. Picked address surfaces in the modal footer for manual copy — no JS interop in v1.
17 lines
540 B
C#
17 lines
540 B
C#
using Shouldly;
|
|
using Xunit;
|
|
using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Pickers;
|
|
|
|
public sealed class FocasAddressBuilderTests
|
|
{
|
|
[Theory]
|
|
[InlineData("axis", 5, "axis:5")]
|
|
[InlineData("spindle", 0, "spindle:0")]
|
|
[InlineData("program", 100, "program:100")]
|
|
[InlineData("status", 1, "status:1")]
|
|
public void Build_Canonical(string group, int parameterId, string expected)
|
|
=> FocasAddressBuilder.Build(group, parameterId).ShouldBe(expected);
|
|
}
|