public void Help_ShouldReturnOptionSetup() { var commandParser = A.Fake <CommandParser <DataTypesCommandOptions> >(); var targetProperty = typeof(DataTypesCommandOptions).GetProperty("Decimal"); var optionParser = A.Fake <DecimalOptionParser>(ob => ob.WithArgumentsForConstructor(() => new DecimalOptionParser(targetProperty, "decimal"))); var setup = new DecimalOptionSetup <DataTypesCommandOptions>(commandParser, optionParser); setup.Help("newHelpText").Should().Be(setup); }
public void Help_ShouldAssignHelpToOptionParser() { var commandParser = A.Fake <CommandParser <DataTypesCommandOptions> >(); var targetProperty = typeof(DataTypesCommandOptions).GetProperty("Decimal"); var optionParser = A.Fake <DecimalOptionParser>(ob => ob.WithArgumentsForConstructor(() => new DecimalOptionParser(targetProperty, "decimal"))); var setup = new DecimalOptionSetup <DataTypesCommandOptions>(commandParser, optionParser); setup.Help("newHelpText"); A.CallToSet(() => optionParser.OptionHelp).To("newHelpText").MustHaveHappened(); }