public void Nested_Index() { // $ ./app-nested var commandProvider = new CoconaCommandProvider(new[] { typeof(TestCommands_Nested) }); var commandCollectionRoot = commandProvider.GetCommandCollection(); var commandStack = Array.Empty <CommandDescriptor>(); var targetCommand = BuiltInPrimaryCommand.GetCommand(string.Empty); // `TestCommands_Multiple` has no primary command. Use BuiltInPrimaryCommand. var commandCollection = commandCollectionRoot; var appContext = new CoconaAppContext(targetCommand, default); appContext.Features.Set <ICoconaCommandFeature>(new CoconaCommandFeature(commandCollection, targetCommand, commandStack, new object() /* unused */)); var helpBuilder = new CoconaHelpMessageBuilder( new FakeAppContextAccessor(appContext), new FakeCommandHelpProvider(), new FakeHelpRenderer(), commandProvider ); var help = helpBuilder.BuildAndRenderForCurrentContext(); help.Should().Be("IndexHelp;Commands=Foo,Bar,TestCommands_Nested_1;SubCommandStack="); }