UnitTesting with Spectre.Console.Cli #1398
-
Hi there! Is there any way to call the Execute method without the apps.Run(args);? And if yes. How can I put the right parameters in the constructors of the CommandContext and CommandSettings class? |
Beta Was this translation helpful? Give feedback.
Answered by
patriksvensson
Dec 4, 2023
Replies: 1 comment 1 reply
-
I would recommend using the Spectre.Console.Testing library, and use that to test your commands. Most of Spectre.Console's own tests uses that library. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
patriksvensson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would recommend using the Spectre.Console.Testing library, and use that to test your commands.
Most of Spectre.Console's own tests uses that library.