use of org.sonar.scanner.scan.report.RuleNameProvider in project sonarqube by SonarSource.
the class RuleNameProviderTest method setUp.
@Before
public void setUp() {
ruleKey = mock(RuleKey.class);
rule = mock(Rule.class);
rules = mock(Rules.class);
provider = new RuleNameProvider(rules);
when(ruleKey.rule()).thenReturn("ruleKey");
when(ruleKey.repository()).thenReturn("repoKey");
when(rule.name()).thenReturn("name");
when(rule.key()).thenReturn(ruleKey);
when(rules.find(any(RuleKey.class))).thenReturn(rule);
}
Aggregations