public VerifyAllEventsUnregistered ( ) : void | ||
return | void |
public void VerifyAllEventsUnregistered()
{
Assert.IsNull(this.ButtonClick, $"{nameof(this.ButtonClick)} event remained registered");
Assert.IsNull(this.Closed, $"{nameof(this.Closed)} event remained registered");
}
public void ErrorListInfoBarController_Dispose() { // Arrange this.SetBindingMode(SonarLintMode.LegacyConnected); var testSubject = new ErrorListInfoBarController(this.host, this.unboundProjectFinder); this.ConfigureLoadedSolution(); ConfigurableSectionController section = this.ConfigureActiveSectionWithBindCommand(args => { }); this.ConfigureProjectViewModel(section); testSubject.Refresh(); RunAsyncAction(); this.outputWindowPane.Reset(); // Sanity ConfigurableInfoBar infoBar = this.infoBarManager.AssertHasAttachedInfoBar(ErrorListInfoBarController.ErrorListToolWindowGuid); VerifyInfoBar(infoBar); // Act testSubject.Dispose(); // Assert this.infoBarManager.AssertHasNoAttachedInfoBar(ErrorListInfoBarController.ErrorListToolWindowGuid); infoBar.VerifyAllEventsUnregistered(); this.outputWindowPane.AssertOutputStrings(0); this.teamExplorerController.ShowConnectionsPageCallsCount.Should().Be(0); }