feat(cli): native-alarm-source commands (template add/list/remove + instance set/clear)

This commit is contained in:
Joseph Doherty
2026-05-31 02:30:05 -04:00
parent c4cea9eea5
commit a6dcbf62cd
4 changed files with 199 additions and 0 deletions
@@ -129,6 +129,27 @@ public class CommandTreeTests
Assert.DoesNotContain("--instance-name", optionNames);
}
[Fact]
public void TemplateNativeAlarmSource_HasAddListRemove()
{
var template = TemplateCommands.Build(Url, Format, Username, Password);
var group = template.Subcommands.Single(c => c.Name == "native-alarm-source");
var subNames = group.Subcommands.Select(c => c.Name).ToHashSet();
Assert.Contains("add", subNames);
Assert.Contains("list", subNames);
Assert.Contains("remove", subNames);
}
[Fact]
public void InstanceNativeAlarmSource_HasSetAndClear()
{
var instance = InstanceCommands.Build(Url, Format, Username, Password);
var group = instance.Subcommands.Single(c => c.Name == "native-alarm-source");
var subNames = group.Subcommands.Select(c => c.Name).ToHashSet();
Assert.Contains("set", subNames);
Assert.Contains("clear", subNames);
}
[Theory]
[InlineData(typeof(GetInstanceCommand))]
[InlineData(typeof(ListSitesCommand))]
@@ -141,6 +162,8 @@ public class CommandTreeTests
[InlineData(typeof(ExportBundleCommand))]
[InlineData(typeof(PreviewBundleCommand))]
[InlineData(typeof(ImportBundleCommand))]
[InlineData(typeof(AddTemplateNativeAlarmSourceCommand))]
[InlineData(typeof(SetInstanceNativeAlarmSourceOverrideCommand))]
public void CommandPayloadTypes_ResolveViaRegistry(Type commandType)
{
// GetCommandName throws ArgumentException for an unregistered type — the CLI