diff --git a/src/ConnectedMode.UnitTests/Binding/UnintrusiveBindingControllerTests.cs b/src/ConnectedMode.UnitTests/Binding/UnintrusiveBindingControllerTests.cs index c5bfa876b..2192a3228 100644 --- a/src/ConnectedMode.UnitTests/Binding/UnintrusiveBindingControllerTests.cs +++ b/src/ConnectedMode.UnitTests/Binding/UnintrusiveBindingControllerTests.cs @@ -117,7 +117,7 @@ public async Task BindAsync_CallsBindingProcessInOrder() } [TestMethod] - public void Unbind_BindingDeletionSucceeded_HandlesBindingChanges() + public void Unbind_BindingDeletionSucceeded_HandlesBindingChangesAndDisconnects() { solutionBindingRepository.DeleteBinding(AnyBoundProject.LocalBindingKey).Returns(true); @@ -126,6 +126,7 @@ public void Unbind_BindingDeletionSucceeded_HandlesBindingChanges() Received.InOrder(() => { solutionBindingRepository.DeleteBinding(AnyBoundProject.LocalBindingKey); + sonarQubeService.Disconnect(); activeSolutionChangedHandler.HandleBindingChange(true); }); } diff --git a/src/ConnectedMode/Binding/IUnintrusiveBindingController.cs b/src/ConnectedMode/Binding/IUnintrusiveBindingController.cs index 39b1ba97a..96d243289 100644 --- a/src/ConnectedMode/Binding/IUnintrusiveBindingController.cs +++ b/src/ConnectedMode/Binding/IUnintrusiveBindingController.cs @@ -75,6 +75,7 @@ public bool Unbind(string localBindingKey) var bindingDeleted = solutionBindingRepository.DeleteBinding(localBindingKey); if (bindingDeleted) { + sonarQubeService.Disconnect(); activeSolutionChangedHandler.HandleBindingChange(true); } return bindingDeleted;