public void Parse_SimpleStringNoRequiredValueNotSupplied_ReturnsNull() { var args = new string[0]; var opt = new SimpleStringOptions(); var p = new CommandLineParser(); p.Parse(opt, args); Assert.Null(opt.Hello); }
public void Parse_SimpleStringNoRequiredValueSupplied_ReturnsValueFromCommandLine() { var args = new[] { "--hello", "sampleval" }; var opt = new SimpleStringOptions(); var p = new CommandLineParser(); p.Parse(opt, args); Assert.Equal("sampleval", opt.Hello); }
public void Parse_Position_ValidResult() { var args = new[] { "sampleval", "sampleval2" }; var opt = new SimpleStringOptions(); var p = new CommandLineParser(); p.Parse(opt, args); Assert.Equal("sampleval", opt.Hello); Assert.Equal("sampleval2", opt.HelloSecond); }