public IHandlerSetup AddScript(string verb, IEnumerable <string> lines, string description = null, string usage = null, string group = null) { Assert.ArgumentNotNullOrEmpty(verb, nameof(verb)); Assert.ArgumentNotNull(lines, nameof(lines)); _scripts.AddScript(verb, lines, description, usage, group); return(this); }
public void GetInstance_Test() { var target = new ScriptHandlerSource(); target.AddScript("test", new[] { "echo 'test'" }); var result = target.GetInstance(Command.Create("test", null), new CommandDispatcher(null, null, null, null, null)); result.Should().NotBeNull(); }