Skip to content

Commit

Permalink
Remove override of solution close logic from SharedBindingSuggestionS…
Browse files Browse the repository at this point in the history
…ervice
  • Loading branch information
georgii-borovinskikh-sonarsource committed Oct 28, 2024
1 parent 1b1701c commit 079db0d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void Show_GeneratesCorrectNotificationStructure()
notificationActions[1].CommandText.Should().Be(BindingStrings.SharedBindingSuggestionInfoOptionText);
notificationActions[1].ShouldDismissAfterAction.Should().BeFalse();
notificationActions[2].Should().BeSameAs(doNotShowAgainMock.Object);
notification.CloseOnSolutionClose.Should().Be(false);
notification.CloseOnSolutionClose.Should().Be(true);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ public void Show(ServerType serverType, Action onConnectHandler)
new NotificationAction(BindingStrings.SharedBindingSuggestionConnectOptionText, _ => onConnectHandler(), true),
new NotificationAction(BindingStrings.SharedBindingSuggestionInfoOptionText, _ => OnLearnMore(), false),
doNotShowAgainNotificationAction
],
// Prevent INotificationService from handling the on solution change events
// as this is exceptionally overriden by the SharedBindingSuggestionService
closeOnSolutionClose: false);
]);

notificationService.ShowNotification(notification);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,6 @@ public void ActiveSolutionChanged_SolutionIsOpened_ShowsGoldBarAndShowManageBind
showAction.Should().NotBeNull();
connectedModeManager.Received(1).ShowManageBindingDialog(true);
}

[TestMethod]
public void ActiveSolutionChanged_SolutionIsClosed_ClosesNotification()
{
RaiseActiveSolutionChanged(false);

suggestSharedBindingGoldBar.Received().Close();
}

private void RaiseActiveSolutionChanged(bool isSolutionOpened)
{
Expand Down
4 changes: 0 additions & 4 deletions src/Integration/MefServices/SharedBindingSuggestionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ private void OnActiveSolutionChanged(object sender, ActiveSolutionChangedEventAr
{
Suggest();
}
else
{
suggestSharedBindingGoldBar.Close();
}
}
}
}

0 comments on commit 079db0d

Please sign in to comment.