Beispiel #1
0
        public void ConfigureReturnsBuilder()
        {
            var builder = ArgumentConfiguration <MyOptions, string> .Configure(
                new ParserBuilder <MyOptions, string>(),
                _ => { });

            builder.ShouldNotBeNull();
        }
Beispiel #2
0
        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;
 }
Beispiel #4
0
 public ArgumentConfigurationTests()
 {
     _instanceUnderTest = new MyConfiguration(_parserBuilderMock.Object);
 }