public void WhenSupressionsUpdated_AnalysisIsRequested() { var builder = new TestEnvironmentBuilder(SonarLintMode.Connected); builder.SimulateSuppressionsUpdated(); builder.AssertAnalysisIsRequested(); builder.Logger.AssertOutputStringExists(AnalysisStrings.ConfigMonitor_SuppressionsUpdated); }
public void WhenSuppressionsUpdated_HasSubscribersToConfigChangedEvent_SubscribersNotified() { var builder = new TestEnvironmentBuilder(SonarLintMode.Connected); var eventHandler = new Mock <EventHandler>(); builder.TestSubject.ConfigChanged += eventHandler.Object; builder.SimulateSuppressionsUpdated(); eventHandler.Verify(x => x(builder.TestSubject, EventArgs.Empty), Times.Once); }
public void WhenDisposed_EventsAreIgnored(SonarLintMode bindingMode) { var builder = new TestEnvironmentBuilder(bindingMode); // Act builder.TestSubject.Dispose(); // Raise events and check they are ignored builder.SimulateSuppressionsUpdated(); builder.SimulateUserSettingsChanged(); builder.AssertAnalysisIsNotRequested(); }