Examples of componentKey()


Examples of org.sonar.api.issue.Issue.componentKey()

    Issue issue = mock(Issue.class);
    when(issue.isNew()).thenReturn(true);
    when(issue.ruleKey()).thenReturn(ruleKey);
    when(issue.message()).thenReturn("issue message");
    when(issue.componentKey()).thenReturn("componentKey");
    when(issue.line()).thenReturn(12);

    List<Issue> issues = new ArrayList<Issue>();
    issues.add(issue);
    when(projectIssues.issues()).thenReturn(issues);
View Full Code Here

Examples of org.sonar.api.issue.Issue.componentKey()

    RuleKey ruleKey = null;
    if (rule != null) {
      ruleKey = rule.ruleKey();
    }
    when(mockIssue.ruleKey()).thenReturn(ruleKey);
    when(mockIssue.componentKey()).thenReturn(component);
    when(mockIssue.line()).thenReturn(line);
    return mockIssue;
  }

  private IssuePattern createPattern(String line) {
View Full Code Here

Examples of org.sonar.api.issue.Issue.componentKey()

    RuleKey ruleKey = null;
    if (rule != null) {
      ruleKey = rule.ruleKey();
    }
    when(mockIssue.ruleKey()).thenReturn(ruleKey);
    when(mockIssue.componentKey()).thenReturn(component);
    when(mockIssue.line()).thenReturn(line);
    return mockIssue;
  }

  @Test
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssue.componentKey()

      .build();

    assertThat(issue).isNotNull();
    assertThat(issue.key()).isNotNull();
    assertThat(issue.effortToFix()).isEqualTo(10000.0);
    assertThat(issue.componentKey()).isEqualTo(componentKey);
    assertThat(issue.projectKey()).isEqualTo(projectKey);
    assertThat(issue.message()).isEqualTo("the message");
    assertThat(issue.line()).isEqualTo(123);
    assertThat(issue.ruleKey().repository()).isEqualTo("squid");
    assertThat(issue.ruleKey().rule()).isEqualTo("NullDereference");
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssue.componentKey()

      .setManualSeverity(false);

    new UpdateConflictResolver().mergeFields(dbIssue, issue);

    assertThat(issue.key()).isEqualTo("ABCDE");
    assertThat(issue.componentKey()).isEqualTo("struts:org.apache.struts.Action");

    // Scan wins on :
    assertThat(issue.line()).isEqualTo(200);
    assertThat(issue.severity()).isEqualTo(Severity.BLOCKER);
    assertThat(issue.manualSeverity()).isFalse();
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssue.componentKey()

    DefaultIssue issue = dto.toDefaultIssue();
    assertThat(issue.key()).isEqualTo("100");
    assertThat(issue.ruleKey().toString()).isEqualTo("squid:AvoidCycle");
    assertThat(issue.language()).isEqualTo("xoo");
    assertThat(issue.componentUuid()).isEqualTo("CDEF");
    assertThat(issue.componentKey()).isEqualTo("org.sonar.sample:Sample");
    assertThat(issue.componentId()).isEqualTo(1L);
    assertThat(issue.moduleUuid()).isEqualTo("BCDE");
    assertThat(issue.moduleUuidPath()).isEqualTo("ABCD.BCDE.");
    assertThat(issue.projectUuid()).isEqualTo("ABCD");
    assertThat(issue.projectKey()).isEqualTo("org.sonar.sample");
View Full Code Here

Examples of org.sonar.api.issue.internal.DefaultIssue.componentKey()

    assertThat(issue.severity()).isEqualTo(Severity.CRITICAL);
    assertThat(issue.line()).isEqualTo(42);
    assertThat(issue.message()).isEqualTo("the message");
    assertThat(issue.key()).isNotEmpty();
    assertThat(issue.ruleKey().toString()).isEqualTo("squid:AvoidCycle");
    assertThat(issue.componentKey()).isEqualTo("struts:src/org/struts/Action.java");
    assertThat(issue.projectKey()).isEqualTo("org.apache:struts-core");
  }

  @Test
  public void filter_issue() throws Exception {
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.