test: preserve server SDK 2.0 value security and history contracts

This commit is contained in:
Joseph Doherty
2026-11-10 10:37:52 -05:00
parent ac5e9d84f0
commit 9cddc9306b
45 changed files with 1215 additions and 641 deletions
@@ -109,7 +109,7 @@ public sealed class NodeManagerStaleMonitoredNodeTests : IDisposable
nm.EnsureFolder("eq-1", null, "Equipment", AddressSpaceRealm.Uns);
nm.MaterialiseAlarmCondition("al-1", "eq-1", "High", "OffNormalAlarm", 500, AddressSpaceRealm.Uns, isNative: false);
var nodeId = new NodeId("al-1", nm.TryGetFolder("eq-1")!.NodeId.NamespaceIndex);
var handle = (NodeHandle)nm.GetManagerHandle(nodeId);
var handle = (NodeHandle)nm.GetManagerHandle(nodeId)!;
handle.ShouldNotBeNull("non-vacuity: the condition is materialised");
var item = new StubItem(handle, Identity());
nm.TrackLiveMonitoredItem(handle, item);
@@ -121,7 +121,7 @@ public sealed class NodeManagerStaleMonitoredNodeTests : IDisposable
item.Statuses.ShouldContain((StatusCode)StatusCodes.BadNodeIdUnknown, "the dropped instance's item is told");
nm.LiveItemCount.ShouldBe(0);
((NodeHandle)nm.GetManagerHandle(nodeId)).ShouldNotBeNull("positive control: the swapped-in condition exists");
((NodeHandle)nm.GetManagerHandle(nodeId)!).ShouldNotBeNull("positive control: the swapped-in condition exists");
}
finally { await host.DisposeAsync(); }
}
@@ -131,7 +131,7 @@ public sealed class NodeManagerStaleMonitoredNodeTests : IDisposable
{
nm.EnsureVariable(rawPath, null, rawPath, "Float", writable: false, realm: AddressSpaceRealm.Raw);
var nodeId = nm.TryGetVariable(rawPath, AddressSpaceRealm.Raw)!.NodeId;
var handle = (NodeHandle)nm.GetManagerHandle(nodeId);
var handle = (NodeHandle)nm.GetManagerHandle(nodeId)!;
var item = new StubItem(handle, Identity());
nm.TrackLiveMonitoredItem(handle, item);
@@ -188,11 +188,11 @@ public sealed class NodeManagerStaleMonitoredNodeTests : IDisposable
public IUserIdentity EffectiveIdentity => identity;
public object ManagerHandle => handle;
public NodeId NodeId => handle.NodeId;
public void QueueValue(DataValue value, ServiceResult error, bool ignoreFilters) => Statuses.Add(error?.StatusCode ?? value.StatusCode);
public void QueueValue(DataValue value, ServiceResult error) => QueueValue(value, error, false);
public void QueueValue(in DataValue value, ServiceResult? error, bool ignoreFilters) => Statuses.Add(error?.StatusCode ?? value.StatusCode);
public void QueueValue(in DataValue value, ServiceResult? error) => QueueValue(value, error, false);
public void Dispose() { }
public INodeManager NodeManager => throw new NotSupportedException();
public IAsyncNodeManager NodeManager => throw new NotSupportedException();
public ISession Session => throw new NotSupportedException();
public uint Id => throw new NotSupportedException();
public uint SubscriptionId => throw new NotSupportedException();