本文整理汇总了C#中CommandLineParser.Should方法的典型用法代码示例。如果您正苦于以下问题:C# CommandLineParser.Should方法的具体用法?C# CommandLineParser.Should怎么用?C# CommandLineParser.Should使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommandLineParser
的用法示例。
在下文中一共展示了CommandLineParser.Should方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetailedHelpWithMissingRequiredAndBadFormat
public void DetailedHelpWithMissingRequiredAndBadFormat()
{
var options = new ComplexOptionsWithHelp();
bool result = new CommandLineParser(new CommandLineParserSettings(Console.Out)).ParseArguments(
new string[] { "-i0" }, options);
result.Should().Be.False();
}
示例2: DetailedHelpWithBadMutualExclusiveness
public void DetailedHelpWithBadMutualExclusiveness()
{
var options = new ComplexOptionsWithHelp();
bool result = new CommandLineParser(new CommandLineParserSettings(true, true, Console.Out)).ParseArguments(
new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "0", "-ap" }, options);
result.Should().Be.False();
}
示例3: Detailed_help_with_missing_required_and_bad_format
public void Detailed_help_with_missing_required_and_bad_format()
{
var options = new ComplexOptionsWithHelp();
bool result = new CommandLineParser(new CommandLineParserSettings(Console.Out)).ParseArguments(
new string[] { "-i0" }, options);
result.Should().BeFalse();
}
示例4: DetailedHelpWithBadFormat
public void DetailedHelpWithBadFormat()
{
var options = new ComplexOptionsWithHelp();
bool result = new CommandLineParser(new CommandLineParserSettings(Console.Out)).ParseArguments(
new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "abc" }, options);
result.Should().Be.False();
}
示例5: Detailed_help_with_bad_format_and_mutual_exclusiveness
public void Detailed_help_with_bad_format_and_mutual_exclusiveness()
{
var options = new ComplexOptionsWithHelp();
bool result = new CommandLineParser(new CommandLineParserSettings(true, true, Console.Out)).ParseArguments(
new string[] { "-iIN.FILE", "-oOUT.FILE", "--offset", "zero", "-pa" }, options);
result.Should().BeFalse();
}