public void GetHelpText_ShouldReturnSpecifiedHelpText() { var parser = new Int64OptionParser(typeof(DataTypesCommandOptions).GetProperty("Int64"), "int64"); parser.OptionHelp = "Help text for option int64."; parser.GetHelpText().Should().Be("Help text for option int64."); }
/// <summary> /// Initializes a new instance of this class. /// </summary> /// <param name="commandParser">The parser for the command the option belongs to.</param> /// <param name="optionParser">The parser for the option.</param> /// <exception cref="ArgumentNullException"><paramref name="commandParser" /> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="optionParser" /> is null.</exception> public Int64OptionSetup(CommandParser <TCommandOptions> commandParser, Int64OptionParser optionParser) : base(commandParser, optionParser) { }
public void NumberStyles_Initially_ShouldReturnAny() { var parser = new Int64OptionParser(typeof(DataTypesCommandOptions).GetProperty("Int64"), "int64"); parser.NumberStyles.Should().Be(NumberStyles.Any); }
public void IsOptionRequired_Initially_ShouldReturnFalse() { var parser = new Int64OptionParser(typeof(DataTypesCommandOptions).GetProperty("Int64"), "int64"); parser.IsOptionRequired.Should().BeFalse(); }
public void FormatProvider_Initially_ShouldReturnValueOfCurrentCulture() { var parser = new Int64OptionParser(typeof(DataTypesCommandOptions).GetProperty("Int64"), "int64"); parser.FormatProvider.Should().Be(new CultureInfo("en-US")); }
public void OptionDefaultValue_Initially_ShouldReturnDefaultOfInt64() { var parser = new Int64OptionParser(typeof(DataTypesCommandOptions).GetProperty("Int64"), "int64"); parser.OptionDefaultValue.Should().Be(default);