Complete management API and CLI command parity

This commit is contained in:
Joseph Doherty
2026-09-10 00:51:45 -04:00
parent 477e2abe97
commit 2750bd2809
38 changed files with 1637 additions and 199 deletions
@@ -0,0 +1,20 @@
using System.CommandLine;
using ZB.MOM.WW.ScadaBridge.CLI.Commands;
namespace ZB.MOM.WW.ScadaBridge.CLI.Tests;
public class ProductionRootTests
{
[Fact]
public void ProductionRoot_ExposesSchemaLibraryAndSecuredWriteLifecycle()
{
var rootType = typeof(SecuredWriteCommands).Assembly.GetType("ZB.MOM.WW.ScadaBridge.CLI.CliApplication");
Assert.NotNull(rootType);
var method = rootType.GetMethod("BuildRoot");
Assert.NotNull(method);
var root = Assert.IsType<RootCommand>(method.Invoke(null, null));
Assert.Contains(root.Subcommands, c => c.Name == "shared-schema");
var secured = root.Subcommands.Single(c => c.Name == "secured-write");
Assert.Equal(new[] { "approve", "list", "reject", "submit" }, secured.Subcommands.Select(c => c.Name).Order());
}
}