use of org.sonar.scanner.rule.RulesLoader in project sonarqube by SonarSource.
the class RulesProviderTest method testRuleTranslation.
@Test
public void testRuleTranslation() {
RulesLoader loader = mock(RulesLoader.class);
when(loader.load()).thenReturn(Lists.newArrayList(getTestRule()));
RulesProvider provider = new RulesProvider();
Rules rules = provider.provide(loader);
assertThat(rules.findAll()).hasSize(1);
assertRule(rules.findAll().iterator().next());
}
Aggregations