Search in sources :

Example 1 with FileHashes

use of org.sonar.scanner.issue.tracking.FileHashes in project sonarqube by SonarSource.

the class TrackedIssueTest method hashes.

@Test
public void hashes() {
    String[] hashArr = new String[] { "hash1", "hash2", "hash3" };
    FileHashes hashes = FileHashes.create(hashArr);
    TrackedIssue issue = new TrackedIssue(hashes);
    issue.setStartLine(1);
    assertThat(issue.getLineHash()).isEqualTo("hash1");
}
Also used : TrackedIssue(org.sonar.scanner.issue.tracking.TrackedIssue) FileHashes(org.sonar.scanner.issue.tracking.FileHashes) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 FileHashes (org.sonar.scanner.issue.tracking.FileHashes)1 TrackedIssue (org.sonar.scanner.issue.tracking.TrackedIssue)1