-
Notifications
You must be signed in to change notification settings - Fork 622
#1718 TestConsole can now be configured and accessed in CommandAppTester #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1718 TestConsole can now be configured and accessed in CommandAppTester #1803
Conversation
@microsoft-github-policy-service agree |
patriksvensson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but left two small nitpick-comments that would be nice if you fixed. 👍
src/Tests/Spectre.Console.Cli.Tests/Unit/Testing/CommandAppTesterTests.cs
Outdated
Show resolved
Hide resolved
src/Tests/Spectre.Console.Cli.Tests/Unit/Testing/CommandAppTesterTests.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Patrik Svensson <patriksvensson@users.noreply.github.com>
Thanks! I’ve applied the changes based on your comments. Let me know if there’s anything else! :) |
|
Merged! Thank you for your contribution. Much appreciated! 👍 |
Feature #1718
Changes
I added a new optional parameter to
CommandAppTesterto override the defaultTestConsole.The
TestConsolecan now be accessed through a public property of theCommandAppTesterinstance.The new parameter is placed last to avoid introducing a breaking change.
Added tests and documentation on how to mock user inputs in interactive commands using CommandAppTester.
Please squash the commits when merging.
Please upvote 👍 this pull request if you are interested in it.