Пример #1
0
        internal static void SetDefault(Builder builder)
        {
            builder.Commands.Clear();
            builder.Commands.Add(CommandsBuilder.BuildClear());
            builder.Commands.Add(CommandsBuilder.BuildCurrentDirectory());
            builder.Commands.Add(CommandsBuilder.BuildTexo());
            builder.Commands.Add(CommandsBuilder.BuildHelp());

            builder.DefaultCommand = string.Empty;
        }
Пример #2
0
        public void InputTree_BuildHelp_HelpTree()
        {
            InputTreeBuilder builder = new InputTreeBuilder(new EmptyLogService());
            InputTree        tree    = builder.Build(new[] { CommandsBuilder.BuildHelp() }, null);

            Assert.NotNull(tree);
            Assert.NotNull(tree.Root);
            Assert.NotNull(tree.Root.Queries["help"]);
            Assert.Empty(tree.Root.Queries["help"].Queries);
            Assert.Empty(tree.Root.Queries["help"].Options);
            Assert.Single(tree.Root.Queries["help"].Parameters);
        }