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

SimulateClosedEvent() public method

public SimulateClosedEvent ( ) : void
return void
        public void SimulateClosedEvent()
        {
            this.Closed?.Invoke(this, EventArgs.Empty);
        }

Usage Example

Example #1
0
        public void ErrorListInfoBarController_RefreshShowInfoBar_ClickClose_UnregisterEvents()
        {
            // Arrange
            this.SetBindingMode(SonarLintMode.LegacyConnected);
            var testSubject = new ErrorListInfoBarController(this.host, this.unboundProjectFinder);

            this.ConfigureLoadedSolution();
            testSubject.Refresh();
            RunAsyncAction();

            // Sanity
            ConfigurableInfoBar infoBar = this.infoBarManager.AssertHasAttachedInfoBar(ErrorListInfoBarController.ErrorListToolWindowGuid);

            VerifyInfoBar(infoBar);

            // Act
            infoBar.SimulateClosedEvent();

            // Assert
            infoBar.VerifyAllEventsUnregistered();
            this.teamExplorerController.ShowConnectionsPageCallsCount.Should().Be(0);
        }
All Usage Examples Of SonarLint.VisualStudio.Integration.UnitTests.ConfigurableInfoBar::SimulateClosedEvent