What is the correct way to handle user input to IAnsiConsole when implementing unit tests? #1524
Unanswered
wbaldoumas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some implementations that leverage the
IAnsiConsole.Prompt
,IAnsiConsole.Ask
, andIAnsiConsole.Confirm
methods.How can I mock user input for these within the context of unit tests? Since these are extension methods, there isn't an easy way to mock the behavior here and I didn't see an obvious way of using
TestConsole
to achieve this, but may have missed something there.Beta Was this translation helpful? Give feedback.
All reactions