Merge B1-twincat: v3 RawPath read-path
This commit is contained in:
+10
-1
@@ -99,7 +99,16 @@ public sealed class TwinCATCommandBaseTests
|
||||
options.Devices.Count.ShouldBe(1);
|
||||
options.Devices[0].HostAddress.ShouldBe("ads://10.0.0.1.1.1:851");
|
||||
options.Devices[0].DeviceName.ShouldBe("cli-10.0.0.1.1.1:851");
|
||||
options.Tags.ShouldBe([tag]);
|
||||
// v3: the CLI serialises its typed def into a RawTagEntry (RawPath = def.Name, DeviceName =
|
||||
// def.DeviceHostAddress) that round-trips through the factory back to the same def.
|
||||
options.RawTags.Count.ShouldBe(1);
|
||||
var entry = options.RawTags[0];
|
||||
entry.RawPath.ShouldBe("n1");
|
||||
entry.DeviceName.ShouldBe(cmd.GatewayForTest);
|
||||
TwinCAT.TwinCATTagDefinitionFactory.FromTagConfig(entry.TagConfig, entry.RawPath, out var roundTripped)
|
||||
.ShouldBeTrue();
|
||||
roundTripped.SymbolPath.ShouldBe("MAIN.x");
|
||||
roundTripped.DataType.ShouldBe(TwinCAT.TwinCATDataType.DInt);
|
||||
options.Timeout.ShouldBe(TimeSpan.FromMilliseconds(4321));
|
||||
options.Probe.Enabled.ShouldBeFalse();
|
||||
options.EnableControllerBrowse.ShouldBeFalse();
|
||||
|
||||
Reference in New Issue
Block a user