Package org.sonar.api.batch.rule

Examples of org.sonar.api.batch.rule.ActiveRules.findAll()


public class ActiveRulesBuilderTest {
  @Test
  public void no_rules() throws Exception {
    ActiveRulesBuilder builder = new ActiveRulesBuilder();
    ActiveRules rules = builder.build();
    assertThat(rules.findAll()).isEmpty();
  }

  @Test
  public void build_rules() throws Exception {
    ActiveRules activeRules = new ActiveRulesBuilder()
View Full Code Here


      // most simple rule
      .create(RuleKey.of("squid", "S0002")).activate()
      .create(RuleKey.of("findbugs", "NPE")).setInternalKey(null).setSeverity(null).setParam("foo", null).activate()
      .build();

    assertThat(activeRules.findAll()).hasSize(3);
    assertThat(activeRules.findByRepository("squid")).hasSize(2);
    assertThat(activeRules.findByRepository("findbugs")).hasSize(1);
    assertThat(activeRules.findByInternalKey("squid", "__S0001__")).isNotNull();
    assertThat(activeRules.findByRepository("unknown")).isEmpty();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.