public void ShouldThrowAnExceptionForShortOptionRequiringValueWhenThereIsNone()
{
var args = new [] { "-n" };
var parser = new OptionsParser(new ParserConfiguration { ThrowValidationException = true });
parser.WithOption<int>('n');
try
{
parser.Parse(args);
Assert.Fail("Should throw an exception");
}
catch (ValidationException e)
{
Assert.IsTrue(e.Message.Contains("requires parameter of type"));
}
}