using System.CommandLine;
using ZB.MOM.WW.ScadaBridge.CLI.Commands;
using ZB.MOM.WW.ScadaBridge.Commons.Messages.Management;
namespace ZB.MOM.WW.ScadaBridge.CLI.Tests;
///
/// CLI-2 (WP2 task 2.8): site update, data-connection update and
/// api-method update send only the options actually passed. Before the fix an
/// omitted option was sent as null (or as a default: --failover-retry-count 3,
/// --timeout 30) and the server overwrote the stored value — e.g.
/// site update --id 3 --name X nulled both gRPC addresses. The server now treats
/// null as "keep"; these tests pin that the CLI sends null for every omitted option.
///
public class PartialUpdateCommandTests
{
private static readonly Option Url = new("--url") { Recursive = true };
private static readonly Option Username = new("--username") { Recursive = true };
private static readonly Option Password = new("--password") { Recursive = true };
private static readonly Option Format = CliOptions.CreateFormatOption();
private static async Task ParseAsync(
Func