test: preserve server SDK 2.0 value security and history contracts
This commit is contained in:
+9
-9
@@ -55,7 +55,7 @@ public sealed class NodeManagerSurgicalShapeUpdateTests : IDisposable
|
||||
applied.ShouldBeTrue();
|
||||
node.DataType.ShouldBe(DataTypeIds.Int32); // swapped in place
|
||||
node.ValueRank.ShouldBe(ValueRanks.Scalar);
|
||||
node.Value.ShouldBeNull(); // stale Float value dropped
|
||||
node.Value.IsNull.ShouldBeTrue(); // stale Float value dropped
|
||||
node.StatusCode.ShouldBe((StatusCode)StatusCodes.BadWaitingForInitialData);
|
||||
|
||||
await host.DisposeAsync();
|
||||
@@ -79,9 +79,9 @@ public sealed class NodeManagerSurgicalShapeUpdateTests : IDisposable
|
||||
|
||||
applied.ShouldBeTrue();
|
||||
node.ValueRank.ShouldBe(ValueRanks.OneDimension);
|
||||
node.ArrayDimensions.ShouldNotBeNull();
|
||||
node.ArrayDimensions.IsNull.ShouldBeFalse();
|
||||
node.ArrayDimensions[0].ShouldBe(8u);
|
||||
node.Value.ShouldBeNull(); // stale scalar value dropped
|
||||
node.Value.IsNull.ShouldBeTrue(); // stale scalar value dropped
|
||||
node.StatusCode.ShouldBe((StatusCode)StatusCodes.BadWaitingForInitialData);
|
||||
|
||||
await host.DisposeAsync();
|
||||
@@ -106,7 +106,7 @@ public sealed class NodeManagerSurgicalShapeUpdateTests : IDisposable
|
||||
|
||||
applied.ShouldBeTrue();
|
||||
node.ArrayDimensions[0].ShouldBe(8u);
|
||||
node.Value.ShouldBeNull();
|
||||
node.Value.IsNull.ShouldBeTrue();
|
||||
node.StatusCode.ShouldBe((StatusCode)StatusCodes.BadWaitingForInitialData);
|
||||
|
||||
await host.DisposeAsync();
|
||||
@@ -131,8 +131,8 @@ public sealed class NodeManagerSurgicalShapeUpdateTests : IDisposable
|
||||
|
||||
applied.ShouldBeTrue();
|
||||
node.ValueRank.ShouldBe(ValueRanks.Scalar);
|
||||
node.ArrayDimensions.ShouldBeNull();
|
||||
node.Value.ShouldBeNull();
|
||||
node.ArrayDimensions.IsNull.ShouldBeTrue();
|
||||
node.Value.IsNull.ShouldBeTrue();
|
||||
node.StatusCode.ShouldBe((StatusCode)StatusCodes.BadWaitingForInitialData);
|
||||
|
||||
await host.DisposeAsync();
|
||||
@@ -154,7 +154,7 @@ public sealed class NodeManagerSurgicalShapeUpdateTests : IDisposable
|
||||
|
||||
applied.ShouldBeTrue();
|
||||
node.ValueRank.ShouldBe(ValueRanks.OneDimension);
|
||||
node.ArrayDimensions.ShouldNotBeNull();
|
||||
node.ArrayDimensions.IsNull.ShouldBeFalse();
|
||||
node.ArrayDimensions[0].ShouldBe(0u); // null length ⇒ [0], same as EnsureVariable
|
||||
|
||||
await host.DisposeAsync();
|
||||
@@ -222,8 +222,8 @@ public sealed class NodeManagerSurgicalShapeUpdateTests : IDisposable
|
||||
|
||||
e.ShouldNotBeNull();
|
||||
e.Changes.ShouldNotBeNull();
|
||||
var changes = e.Changes.Value;
|
||||
changes.Length.ShouldBe(1);
|
||||
var changes = e.Changes!.Value;
|
||||
changes.Count.ShouldBe(1);
|
||||
changes[0].Affected.ShouldBe(node.NodeId);
|
||||
changes[0].AffectedType.ShouldBe(VariableTypeIds.BaseDataVariableType);
|
||||
changes[0].Verb.ShouldBe((byte)ModelChangeStructureVerbMask.DataTypeChanged);
|
||||
|
||||
Reference in New Issue
Block a user