public void IsSupported()
        {
            var testSubject = new CLangAnalyzer(telemetryManagerMock.Object, new ConfigurableSonarLintSettings(),
                                                rulesConfigProviderMock.Object, serviceProviderWithValidProjectItem.Object, analysisNotifierMock.Object, testLogger, Mock.Of <ICFamilyIssueToAnalysisIssueConverter>());

            testSubject.IsAnalysisSupported(new[] { AnalysisLanguage.CFamily }).Should().BeTrue();
            testSubject.IsAnalysisSupported(new[] { AnalysisLanguage.Javascript }).Should().BeFalse();
            testSubject.IsAnalysisSupported(new[] { AnalysisLanguage.Javascript, AnalysisLanguage.CFamily }).Should().BeTrue();
        }
Exemple #2
0
        public void IsSupported()
        {
            // Arrange
            var telemetryManagerMock    = new Mock <ITelemetryManager>();
            var testLogger              = new TestLogger();
            var rulesConfigProviderMock = new Mock <ICFamilyRulesConfigProvider>();

            var analyzer = new CLangAnalyzer(telemetryManagerMock.Object, new ConfigurableSonarLintSettings(),
                                             rulesConfigProviderMock.Object, testLogger);

            // Act and Assert
            analyzer.IsAnalysisSupported(new[] { AnalysisLanguage.CFamily }).Should().BeTrue();
            analyzer.IsAnalysisSupported(new[] { AnalysisLanguage.Javascript }).Should().BeFalse();
            analyzer.IsAnalysisSupported(new[] { AnalysisLanguage.Javascript, AnalysisLanguage.CFamily }).Should().BeTrue();
        }