test(v3): migrate 6 driver IntegrationTests to RawTags API
Replace pre-declared options.Tags (typed <Driver>TagDefinition lists) with options.RawTags (IReadOnlyList<RawTagEntry>) across all 6 Docker-gated driver integration suites so they COMPILE against the v3 driver API. Each project gets a local <Driver>RawTags helper mirroring the unit-test project's helper: it serialises a typed def back to its TagConfig blob via the driver's <Driver>TagDefinitionFactory.ToTagConfig and packages it as a RawTagEntry (RawPath = def.Name; DeviceName = def.DeviceHostAddress for the multi-device drivers AbCip/AbLegacy/TwinCAT/FOCAS). Test intent (addresses, data types, device routing, assertions) is unchanged — only the tag-authoring/config-delivery shape was migrated. Docker-gated: these still skip at runtime without fixtures; COMPILE is the gate.
This commit is contained in:
+4
-6
@@ -47,12 +47,11 @@ public sealed class ExceptionInjectionTests(ModbusSimulatorFixture sim)
|
||||
Port = sim.Port,
|
||||
UnitId = 1,
|
||||
Timeout = TimeSpan.FromSeconds(2),
|
||||
Tags =
|
||||
[
|
||||
RawTags = ModbusRawTags.Entries([
|
||||
new ModbusTagDefinition(tagName,
|
||||
ModbusRegion.HoldingRegisters, Address: (ushort)address,
|
||||
DataType: ModbusDataType.UInt16, Writable: false),
|
||||
],
|
||||
]),
|
||||
Probe = new ModbusProbeOptions { Enabled = false },
|
||||
};
|
||||
await using var driver = new ModbusDriver(opts, driverInstanceId: "modbus-exc");
|
||||
@@ -112,12 +111,11 @@ public sealed class ExceptionInjectionTests(ModbusSimulatorFixture sim)
|
||||
Port = sim.Port,
|
||||
UnitId = 1,
|
||||
Timeout = TimeSpan.FromSeconds(2),
|
||||
Tags =
|
||||
[
|
||||
RawTags = ModbusRawTags.Entries([
|
||||
new ModbusTagDefinition(tag,
|
||||
ModbusRegion.HoldingRegisters, Address: (ushort)address,
|
||||
DataType: ModbusDataType.UInt16, Writable: true),
|
||||
],
|
||||
]),
|
||||
Probe = new ModbusProbeOptions { Enabled = false },
|
||||
};
|
||||
await using var driver = new ModbusDriver(opts, driverInstanceId: "modbus-exc-write");
|
||||
|
||||
Reference in New Issue
Block a user