private JavaScriptAnalyzer CreateTestSubject(
            IEslintBridgeProcess eslintBridgeProcess,
            IEslintBridgeClientFactory eslintBridgeClientFactory = null,
            IActiveJavaScriptRulesProvider activeRulesProvider   = null,
            IEslintBridgeIssueConverter issueConverter           = null,
            ITelemetryManager telemetryManager           = null,
            IAnalysisStatusNotifier statusNotifier       = null,
            IActiveSolutionTracker activeSolutionTracker = null,
            IAnalysisConfigMonitor analysisConfigMonitor = null,
            ILogger logger = null)
        {
            issueConverter ??= Mock.Of <IEslintBridgeIssueConverter>();
            logger ??= Mock.Of <ILogger>();
            telemetryManager ??= Mock.Of <ITelemetryManager>();
            statusNotifier ??= Mock.Of <IAnalysisStatusNotifier>();
            activeRulesProvider ??= Mock.Of <IActiveJavaScriptRulesProvider>();
            activeSolutionTracker ??= Mock.Of <IActiveSolutionTracker>();
            analysisConfigMonitor ??= Mock.Of <IAnalysisConfigMonitor>();

            return(new JavaScriptAnalyzer(eslintBridgeClientFactory,
                                          eslintBridgeProcess,
                                          activeRulesProvider,
                                          issueConverter,
                                          telemetryManager,
                                          statusNotifier,
                                          activeSolutionTracker,
                                          analysisConfigMonitor,
                                          logger));
        }
        public EslintBridgeAnalyzer(
            IRulesProvider rulesProvider,
            IEslintBridgeClient eslintBridgeClient,
            IActiveSolutionTracker activeSolutionTracker,
            IAnalysisConfigMonitor analysisConfigMonitor,
            IEslintBridgeIssueConverter issueConverter,
            ILogger logger)
        {
            this.rulesProvider         = rulesProvider;
            this.eslintBridgeClient    = eslintBridgeClient;
            this.activeSolutionTracker = activeSolutionTracker;
            this.analysisConfigMonitor = analysisConfigMonitor;
            this.issueConverter        = issueConverter;
            this.logger = logger;

            activeSolutionTracker.ActiveSolutionChanged += ActiveSolutionTracker_ActiveSolutionChanged;
            analysisConfigMonitor.ConfigChanged         += AnalysisConfigMonitor_ConfigChanged;
        }
        private EslintBridgeAnalyzer CreateTestSubject(
            IEslintBridgeClient eslintBridgeClient       = null,
            IRulesProvider rulesProvider                 = null,
            IActiveSolutionTracker activeSolutionTracker = null,
            IAnalysisConfigMonitor analysisConfigMonitor = null,
            IEslintBridgeIssueConverter issueConverter   = null,
            ILogger logger = null)
        {
            eslintBridgeClient ??= SetupEslintBridgeClient().Object;
            rulesProvider ??= Mock.Of <IRulesProvider>();
            activeSolutionTracker ??= Mock.Of <IActiveSolutionTracker>();
            analysisConfigMonitor ??= Mock.Of <IAnalysisConfigMonitor>();
            issueConverter ??= Mock.Of <IEslintBridgeIssueConverter>();
            logger ??= Mock.Of <ILogger>();

            return(new EslintBridgeAnalyzer(rulesProvider,
                                            eslintBridgeClient,
                                            activeSolutionTracker,
                                            analysisConfigMonitor,
                                            issueConverter,
                                            logger));
        }
        internal JavaScriptAnalyzer(IEslintBridgeClientFactory eslintBridgeClientFactory,
                                    IEslintBridgeProcess eslintBridgeProcess,
                                    IActiveJavaScriptRulesProvider activeRulesProvider,
                                    IEslintBridgeIssueConverter issuesConverter,
                                    ITelemetryManager telemetryManager,
                                    IAnalysisStatusNotifier analysisStatusNotifier,
                                    IActiveSolutionTracker activeSolutionTracker,
                                    IAnalysisConfigMonitor analysisConfigMonitor,
                                    ILogger logger)
        {
            this.eslintBridgeClientFactory = eslintBridgeClientFactory;
            this.eslintBridgeProcess       = eslintBridgeProcess;
            this.activeRulesProvider       = activeRulesProvider;
            this.issuesConverter           = issuesConverter;
            this.telemetryManager          = telemetryManager;
            this.analysisStatusNotifier    = analysisStatusNotifier;
            this.activeSolutionTracker     = activeSolutionTracker;
            this.analysisConfigMonitor     = analysisConfigMonitor;
            this.logger = logger;

            activeSolutionTracker.ActiveSolutionChanged += ActiveSolutionTracker_ActiveSolutionChanged;
            analysisConfigMonitor.ConfigChanged         += AnalysisConfigMonitor_ConfigChanged;
        }
        private JavaScriptAnalyzer CreateTestSubject(IEslintBridgeClient client = null,
                                                     IEslintBridgeIssueConverter issueConverter         = null,
                                                     IActiveJavaScriptRulesProvider activeRulesProvider = null,
                                                     ITelemetryManager telemetryManager           = null,
                                                     IAnalysisStatusNotifier statusNotifier       = null,
                                                     IActiveSolutionTracker activeSolutionTracker = null,
                                                     IAnalysisConfigMonitor analysisConfigMonitor = null,
                                                     ILogger logger = null)
        {
            client ??= SetupEslintBridgeClient(null).Object;

            var serverProcess             = SetupServerProcess(123);
            var eslintBridgeClientFactory = SetupEslintBridgeClientFactory(123, client);

            return(CreateTestSubject(serverProcess.Object,
                                     eslintBridgeClientFactory.Object,
                                     activeRulesProvider,
                                     issueConverter,
                                     telemetryManager,
                                     statusNotifier,
                                     activeSolutionTracker,
                                     analysisConfigMonitor,
                                     logger));
        }