public void Parser_state_instance_should_not_pre_built() { var options = new FakeOptionsWithPreBuiltParserState(); Assert.ThrowsDelegate act = () => new CommandLine.Parser( with => with.HelpWriter = new StringWriter()).ParseArguments(new[] { "--bar" }, options); Assert.Throws<InvalidOperationException>(act); }
public void Parser_state_instance_should_not_pre_built() { var options = new FakeOptionsWithPreBuiltParserState(); Assert.ThrowsDelegate act = () => new CommandLine.Parser( with => with.HelpWriter = new StringWriter()).ParseArguments(new[] { "--bar" }, options); Assert.Throws <InvalidOperationException>(act); }