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 WhenBindingIsChanged(SonarLintMode bindingMode, bool shouldAnalysisBeRequested)
        {
            var builder = new TestEnvironmentBuilder(bindingMode);

            builder.SimulateBindingChanged();

            if (shouldAnalysisBeRequested)
            {
                builder.AssertAnalysisIsRequested();
                builder.Logger.AssertOutputStringExists(AnalysisStrings.ConfigMonitor_SolutionBound);
            }
            else
            {
                builder.AssertAnalysisIsNotRequested();
                builder.Logger.AssertNoOutputMessages();
            }
        }