SonarLint.VisualStudio.Integration.UnitTests.ConfigurableInfoBar.VerifyAllEventsUnregistered C# (CSharp) Method

VerifyAllEventsUnregistered() public method

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");
        }

Usage Example

Exemplo n.º 1
0
        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);
        }
All Usage Examples Of SonarLint.VisualStudio.Integration.UnitTests.ConfigurableInfoBar::VerifyAllEventsUnregistered