-
Notifications
You must be signed in to change notification settings - Fork 77
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
SLVS-1491 Refactor: use ConnectedModeManager #5730
SLVS-1491 Refactor: use ConnectedModeManager #5730
Conversation
…log. This has multiple advantages including better testability of code and the fact that the callers don't have to add references to all the services required to show the ManageBinding dialog,
…nnection to the server is shown.
…ntiate the ManageBindingDialog
suggestSharedBindingGoldBar.When(x => x.Show(ServerType.SonarQube, Arg.Any<Action>())).Do(callInfo => | ||
{ | ||
callInfo.Arg<Action>()(); | ||
connectedModeManager.Received(1).ShowManageBindingDialog(true); |
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.
Not sure if it's a good idea to put assertions inside setup code. If you wanted to assert the order of calls, you can use Received.InOrder(...)
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.
I don't want to test the order, but I want to know what happens when the action is called. So, I really have to store the action and call it. I can refactor this to make it more explicit.
Quality Gate passedIssues Measures |
34b0d8a
into
feature/fix-suggestion
Refactoring: use ConnectedModeManager in the other places where we instantiate the ManageBindingDialog to make code better testable