public void ConfigureReturnsBuilder() { var builder = ArgumentConfiguration <MyOptions, string> .Configure( new ParserBuilder <MyOptions, string>(), _ => { }); builder.ShouldNotBeNull(); }
public void TestNewArgumentConfiguration() { ArgumentConfiguration argumentConfiguration = this.ConfigurationFactory.NewArgumentConfiguration( "argumentName", typeof(string), "argumentFormat", true, "usage information" ); Assert.IsNotNull(argumentConfiguration); Assert.IsInstanceOf(typeof(ArgumentConfigurationImpl), argumentConfiguration); Assert.AreEqual("argumentName", argumentConfiguration.Name); Assert.AreEqual(typeof(string), argumentConfiguration.ValueType); Assert.AreEqual("argumentFormat", argumentConfiguration.ValueFormat); Assert.AreEqual(true, argumentConfiguration.Mandatory); Assert.AreEqual("usage information", argumentConfiguration.Usage); }
private void ApplyArgumentConfiguration(string parameter, ArgumentConfiguration argumentConfiguration) { this.Arguments[argumentConfiguration.Name] = parameter; }
public ArgumentConfigurationTests() { _instanceUnderTest = new MyConfiguration(_parserBuilderMock.Object); }