public void TestParameterInformation() { ParameterCounter parameters = null; Assert.DoesNotThrow(() => { parameters = DUMMY_METHOD_METADATA.ParameterCounter; }); Assert.That(parameters.PrefixRequired, Is.EqualTo(1)); Assert.That(parameters.Optional, Is.EqualTo(1)); Assert.IsTrue(parameters.HasRest); Assert.That(parameters.SuffixRequired, Is.EqualTo(1)); Assert.That(parameters.KeyRequired, Is.EqualTo(2)); Assert.That(parameters.KeyOptional, Is.EqualTo(2)); Assert.IsTrue(parameters.HasKeyRest); Assert.IsTrue(parameters.HasBlock); }
public ArityValidator(ArgumentBundle arguments, MethodMetadata method) { this.arguments = arguments; this.method = method; counter = method.ParameterCounter; }
public RequiredPrefixState(ParameterCounter parameterCounter) : base(parameterCounter) { }
public KeyRestState(ParameterCounter parameterCounter) : base(parameterCounter) { }
public OptionalState(ParameterCounter parameterCounter) : base(parameterCounter) { }
public BlockState(ParameterCounter parameterCounter) : base(parameterCounter) { }