using System.Collections.Generic; using CliFx.Domain; namespace CliFx.Tests.Internal { internal class CommandInputBuilder { private readonly List _directives = new List(); private readonly List _parameters = new List(); private readonly List _options = new List(); private string? _commandName; public CommandInputBuilder SetCommandName(string commandName) { _commandName = commandName; return this; } public CommandInputBuilder AddDirective(string directive) { _directives.Add(new CommandDirectiveInput(directive)); return this; } public CommandInputBuilder AddParameter(string parameter) { _parameters.Add(new CommandParameterInput(parameter)); return this; } public CommandInputBuilder AddOption(string alias, params string[] values) { _options.Add(new CommandOptionInput(alias, values)); return this; } public CommandInput Build() => new CommandInput( _directives, _commandName, _parameters, _options ); } }