fix: preserve SDK 2.0 client value and lifetime contracts
This commit is contained in:
@@ -33,9 +33,9 @@ public class HistoryUpdateCommandTests
|
||||
.BuildDetails().ShouldBeOfType<UpdateDataDetails>();
|
||||
d.PerformInsertReplace.ShouldBe(PerformUpdateType.Insert);
|
||||
d.UpdateValues.Count.ShouldBe(2);
|
||||
d.UpdateValues[1].Value.ShouldBe(2.5);
|
||||
d.UpdateValues[1].WrappedValue.ShouldBe(Variant.From(2.5));
|
||||
d.UpdateValues[0].SourceTimestamp.ShouldBe(new DateTime(2026, 1, 15, 8, 0, 0, DateTimeKind.Utc));
|
||||
d.NodeId.Identifier.ShouldBe("HistNode");
|
||||
d.NodeId.IdentifierAsString.ShouldBe("HistNode");
|
||||
}
|
||||
|
||||
/// <summary>Replace and update map to their update types.</summary>
|
||||
@@ -60,7 +60,7 @@ public class HistoryUpdateCommandTests
|
||||
{
|
||||
var d = Make(values: [value], times: ["2026-01-15T08:00:00Z"], type: type)
|
||||
.BuildDetails().ShouldBeOfType<UpdateDataDetails>();
|
||||
d.UpdateValues[0].Value.ShouldBeOfType(expected);
|
||||
ZB.MOM.WW.OtOpcUa.Client.Shared.Helpers.ValueConverter.ToClrObject(d.UpdateValues[0].WrappedValue).ShouldBeOfType(expected);
|
||||
}
|
||||
|
||||
/// <summary>delete-raw builds DeleteRawModifiedDetails with IsDeleteModified=false.</summary>
|
||||
@@ -211,7 +211,7 @@ public class HistoryUpdateCommandTests
|
||||
public async Task Execute_UnnamedStatus_PrintsHex()
|
||||
{
|
||||
const uint unnamed = 0x8FFF0000u;
|
||||
StatusCodes.GetBrowseName(unnamed).ShouldBeNullOrEmpty(); // precondition: genuinely unnamed
|
||||
new StatusCode(unnamed).SymbolicId.ShouldBeNullOrEmpty(); // precondition: genuinely unnamed
|
||||
var svc = new FakeOpcUaClientService
|
||||
{
|
||||
HistoryUpdateResult = new HistoryUpdateOutcome(StatusCodes.Good, [StatusCodes.Good],
|
||||
|
||||
Reference in New Issue
Block a user