Package org.sonar.server.issue.index

Examples of org.sonar.server.issue.index.IssueDoc


    Collection<ComponentDto> componentDtos = newHashSet();
    List<ComponentDto> projectDtos = newArrayList();
    Map<String, ComponentDto> projectsByComponentUuid = newHashMap();

    for (Issue issue : result.getHits()) {
      IssueDoc issueDoc = (IssueDoc) issue;
      issueKeys.add(issue.key());
      ruleKeys.add(issue.ruleKey());
      projectUuids.add(issueDoc.projectUuid());
      componentUuids.add(issueDoc.componentUuid());
      actionPlanKeys.add(issue.actionPlanKey());
      if (issue.reporter() != null) {
        userLogins.add(issue.reporter());
      }
      if (issue.assignee() != null) {
View Full Code Here


    tester.get(RuleDao.class).insert(session, manualRule);
    session.commit();

    Issue result = service.createManualIssue(file.key(), manualRule.getKey(), 10, "Fix it", Severity.MINOR, 2d);

    IssueDoc manualIssue = (IssueDoc) indexClient.get(IssueIndex.class).getByKey(result.key());
    assertThat(manualIssue.componentUuid()).isEqualTo(file.uuid());
    assertThat(manualIssue.projectUuid()).isEqualTo(project.uuid());
    assertThat(manualIssue.ruleKey()).isEqualTo(manualRule.getKey());
    assertThat(manualIssue.message()).isEqualTo("Fix it");
    assertThat(manualIssue.line()).isEqualTo(10);
    assertThat(manualIssue.severity()).isEqualTo(Severity.MINOR);
    assertThat(manualIssue.effortToFix()).isEqualTo(2d);
    assertThat(manualIssue.reporter()).isEqualTo(connectedUser.getLogin());
  }
View Full Code Here

TOP

Related Classes of org.sonar.server.issue.index.IssueDoc

Copyright © 2018 www.massapicom. 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.