コード例 #1
0
        public void can_retrieve_command_arguments_from_a_type_with_required_arguments(ICommandTypeInfoParser infoParser, IEnumerable <ICommandArgument> result)
        {
            "Give I have a command type info parser"
            ._(() => infoParser = ServiceLocator.Resolve <CommandTypeInfoParser>());

            "When I parse the arguments"
            ._(() => result = infoParser.GetArguments(typeof(Init)));

            "It should retreive them"
            ._(() => result.Should().NotBeNull());

            "It should have the correct argument name"
            ._(() => result.First().Name.Should().Be("ProjectName"));

            "It should have the correct number of required arguments"
            ._(() => result.First().Required.Should().BeTrue());
        }
コード例 #2
0
 public MarkdownHelpFormatter(ICommandTypeInfoParser typeInfoParser)
 {
     _typeInfoParser = typeInfoParser;
 }
コード例 #3
0
 public ConsoleHelpFormatter(ICommandTypeInfoParser typeInfoParser)
 {
     _typeInfoParser = typeInfoParser;
 }