/// <summary>
        /// Defualt Constructor
        /// </summary>
        public ArgumentModelAnalyzer()
        {
            _TargetType   = typeof(T);
            this._Options = new List <Option>();
            this._Verbs   = new List <Verb>();

            this._VerbDefinitions   = VerbDefinitionAttributeHelper.ExtractPropertiesMarkedWithVerbAttribute(this._TargetType);
            this._OptionDefinitions = OptionDefinitionAttributeHelper.ExtractPropertiesMarkedWithOptionAttribute(this._TargetType);
        }
Exemplo n.º 2
0
        public void FromClassWithPropertyMarkedAsVerb_PropertyIsExtracted()
        {
            //******** GIVEN
            var targetType = typeof(ParserTestOnVerbs.TestArguments);

            //******** WHEN
            var extractedProperties = VerbDefinitionAttributeHelper.ExtractPropertiesMarkedWithVerbAttribute(targetType);

            //******** ASSERT
            Assert.IsNotNull(extractedProperties);
            Assert.IsTrue(extractedProperties.Count(x => x.Key.Name == "Copy") > 0, $"Unable to find property Copy inside extracted list");
        }