public void WhenDisposed_EventsAreIgnored(SonarLintMode bindingMode) { var builder = new TestEnvironmentBuilder(bindingMode); // Act builder.TestSubject.Dispose(); // Raise events and check they are ignored builder.SimulateBindingChanged(); builder.SimulateBindingUpdated(); builder.SimulateUserSettingsChanged(); builder.AssertAnalysisIsNotRequested(); }
public void WhenBindingIsUpdated(SonarLintMode bindingMode, bool shouldAnalysisBeRequested) { var builder = new TestEnvironmentBuilder(bindingMode); builder.SimulateBindingUpdated(); if (shouldAnalysisBeRequested) { builder.AssertAnalysisIsRequested(); builder.Logger.AssertOutputStringExists(AnalysisStrings.ConfigMonitor_BindingUpdated); } else { builder.AssertAnalysisIsNotRequested(); builder.Logger.AssertNoOutputMessages(); } }