Package org.sonar.server.rule

Examples of org.sonar.server.rule.Rule.internalKey()


        org.sonar.batch.protocol.input.ActiveRule inputActiveRule = new org.sonar.batch.protocol.input.ActiveRule(
          activeRule.key().ruleKey().repository(),
          activeRule.key().ruleKey().rule(),
          rule.name(),
          activeRule.severity(),
          rule.internalKey(),
          qProfile.language());
        for (Map.Entry<String, String> entry : activeRule.params().entrySet()) {
          inputActiveRule.addParam(entry.getKey(), entry.getValue());
        }
        ref.addActiveRule(inputActiveRule);
View Full Code Here


    when(activeRule.params()).thenReturn(ImmutableMap.of("max", "2"));
    when(qProfileLoader.findActiveRulesByProfile("abcd")).thenReturn(newArrayList(activeRule));

    Rule rule = mock(Rule.class);
    when(rule.name()).thenReturn("Avoid Cycle");
    when(rule.internalKey()).thenReturn("squid-1");
    when(ruleService.getNonNullByKey(ruleKey)).thenReturn(rule);

    WsTester.TestRequest request = tester.newGetRequest("batch", "project").setParam("key", projectKey);
    request.execute().assertJson(getClass(), "return_active_rules.json");
  }
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.