feat(sms): CLI list --type/--phones + notification sms group + channel-aware recipients (S6)

This commit is contained in:
Joseph Doherty
2026-06-19 10:40:09 -04:00
parent cdfd0ffbd2
commit 73df322a66
7 changed files with 638 additions and 37 deletions
@@ -67,7 +67,21 @@ public class UpdateCommandContractTests
[Fact]
public void NotificationUpdate_CoreFieldsRequired()
=> AssertRequired(UpdateCommand(NotificationCommands.Build(Url, Format, Username, Password), "update"), "--name", "--emails");
{
// Only --name is unconditionally required. The recipient flags are channel-
// conditional (SMS Notifications S6): --emails is required for --type email and
// --phones for --type sms, so neither can be flagged Required at the option level
// — the create/update builders validate the channel/recipient pairing instead.
var update = UpdateCommand(NotificationCommands.Build(Url, Format, Username, Password), "update");
AssertRequired(update, "--name");
foreach (var name in new[] { "--emails", "--phones" })
{
var option = update.Options.SingleOrDefault(o => o.Name == name);
Assert.True(option != null, $"notification update is missing option '{name}'.");
Assert.False(option!.Required, $"notification update option '{name}' must be conditionally validated, not Required.");
}
}
[Fact]
public void ApiMethodUpdate_CoreFieldsRequired()