public ParserPositionalParameter AddPositionalParameter(string key, bool isCollection) { var param = new ParserPositionalParameter(key, isCollection); _positionalParameters.Add(param); _positionalQueue.Enqueue(param); return param; }
public void CanPushStringList() { ParserParameter param = new ParserPositionalParameter("Names", true); ParseResult result = new ParseResult(); result.AddCommandListValue(param, "Fred"); result.AddCommandListValue(param, "Barney"); var pusher = new CommandPusher(result); var command = new ListCommand(); pusher.Push(command); command.Names.ShouldContain(x => x == "Fred"); command.Names.ShouldContain(x => x == "Barney"); }