-
Notifications
You must be signed in to change notification settings - Fork 647
Minimal changes to improve CLI testability. #8657
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
Conversation
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.
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
15354ed
to
1e533c7
Compare
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.
Nice! Except for the excess use of tuples
Once 9.2 ships we can get to work on those |
async (context) => { | ||
return await runner.GetAppHostInformationAsync(projectFile, cancellationToken); | ||
}); | ||
var appHostInformationResult = await InteractionUtils.ShowStatusAsync( |
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.
This should also be an interface too right?
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.
It will be eventually. I'm just starting to gather up everything first to centralise the dependency
This PR starts to lay the groundwork for improving our testing story for the CLI. It does a few things:
Introduces an
IDotNetCliRunner
so that we can mock out executing CLI commands. Adds a couple of test classes - one for each command and some plumbing to support creating the service collection.At the moment the test cases only cover making sure the
--help
command runs - a sort of smoke test.