Пример #1
0
        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);
        }
Пример #2
0
 public ArityValidator(ArgumentBundle arguments, MethodMetadata method)
 {
     this.arguments = arguments;
     this.method    = method;
     counter        = method.ParameterCounter;
 }
Пример #3
0
 public RequiredPrefixState(ParameterCounter parameterCounter)
     : base(parameterCounter)
 {
 }
Пример #4
0
 public KeyRestState(ParameterCounter parameterCounter)
     : base(parameterCounter)
 {
 }
Пример #5
0
 public OptionalState(ParameterCounter parameterCounter)
     : base(parameterCounter)
 {
 }
Пример #6
0
 public BlockState(ParameterCounter parameterCounter)
     : base(parameterCounter)
 {
 }