public SonarQubeRule(string key, string repositoryKey, bool isActive, SonarQubeIssueSeverity severity, IDictionary <string, string> parameters, SonarQubeIssueType issueType) { Key = key; RepositoryKey = repositoryKey; IsActive = isActive; Severity = severity; IssueType = issueType; if (parameters == null || parameters.Count == 0) { Parameters = Empty; } else { Parameters = new ReadOnlyDictionary <string, string>(parameters); } }
public void Convert(string inputData, SonarQubeIssueType expectedResult) { SonarQubeIssueTypeConverter.Convert(inputData).Should().Be(expectedResult); }
private static bool IsSupportedIssueType(SonarQubeIssueType issueType) => issueType == SonarQubeIssueType.CodeSmell || issueType == SonarQubeIssueType.Bug || issueType == SonarQubeIssueType.Vulnerability;
public void IsSupportedRule_Severity(SonarQubeIssueType issueType, bool expected) { var rule = new SonarQubeRule("any", "any", true, SonarQubeIssueSeverity.Blocker, null, issueType); CSharpVBBindingConfigProvider.IsSupportedRule(rule).Should().Be(expected); }