You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, for unit testing purposes, I want to access the subcommand object to see if it has the correct options set, etc. Is there a way to access the subcommand object when using RunAll?
The text was updated successfully, but these errors were encountered:
In the unit test, if you have access to the CommandLine object, you can call CommandLine.getParseResult(). You can query this object to see which options were matched. You can also descend into the subcommands with ParseResult.hasSubcommand() and ParseResult.subcommand().
As a side-note, it may be good to have this question on StackOverflow to build a knowledge base for other picocli users. Would you be okay with moving this conversation to StackOverflow?
I have a command with subcommands, which are registered declaratively, and I'm interested in using this style of command line processing:
However, for unit testing purposes, I want to access the subcommand object to see if it has the correct options set, etc. Is there a way to access the subcommand object when using RunAll?
The text was updated successfully, but these errors were encountered: