feat(cli): add enable/disable condition commands (H4 client path)

This commit is contained in:
Joseph Doherty
2026-06-19 01:48:21 -04:00
parent eb328e5761
commit 88d5ba45bf
10 changed files with 488 additions and 0 deletions
@@ -208,11 +208,25 @@ internal sealed class FakeSessionAdapter : ISessionAdapter
/// </summary>
public List<object[]> CallMethodInputArgs { get; } = [];
/// <summary>
/// Records the object node id passed to each <see cref="CallMethodAsync"/> invocation,
/// so tests can assert which condition object a method was invoked on.
/// </summary>
public List<NodeId> CallMethodObjectIds { get; } = [];
/// <summary>
/// Records the method node id passed to each <see cref="CallMethodAsync"/> invocation,
/// so tests can assert the correct Part 9 method (e.g. Enable/Disable) was invoked.
/// </summary>
public List<NodeId> CallMethodMethodIds { get; } = [];
/// <inheritdoc />
public Task<IList<object>?> CallMethodAsync(NodeId objectId, NodeId methodId, object[] inputArguments,
CancellationToken ct = default)
{
CallMethodCount++;
CallMethodObjectIds.Add(objectId);
CallMethodMethodIds.Add(methodId);
CallMethodInputArgs.Add(inputArguments);
if (CallMethodException != null)
throw CallMethodException;