public void TestNewUsageGeneratorImpl() { string programName = "the_program"; OptionConfiguration optionConfiguration = ConfigurationFactory.NewOptionConfiguration( "optionName", typeof(string), "optionFormat", true, "usage information" ); IDictionary <string, OptionConfiguration> optionsConfiguration = new Dictionary <string, OptionConfiguration>(); optionsConfiguration.Add("bob", optionConfiguration); UsageGenerator usageGenerator = this.ConfigurationFactory.NewUsageGenerator( programName, optionsConfiguration ); Assert.IsNotNull(usageGenerator); Assert.IsInstanceOf(typeof(UsageGeneratorImpl), usageGenerator); UsageGeneratorImpl usageGeneratorImpl = usageGenerator as UsageGeneratorImpl; Assert.AreEqual(optionsConfiguration, usageGeneratorImpl.OptionsConfiguration); }
public UsageGenerator NewUsageGenerator( string programName, IDictionary <string, OptionConfiguration> optionsConfiguration ) { UsageGeneratorImpl usageGenerator = new UsageGeneratorImpl(); usageGenerator.OptionsConfiguration = optionsConfiguration; return(usageGenerator); }