use of org.sonar.server.computation.task.projectanalysis.duplication.CrossProjectDuplicate in project sonarqube by SonarSource.
the class DuplicationLineReaderTest method read_duplication_with_duplicates_on_other_file_from_other_project.
@Test
public void read_duplication_with_duplicates_on_other_file_from_other_project() {
DuplicationLineReader reader = duplicationLineReader(duplication(1, 2, new CrossProjectDuplicate("other-component-key-from-another-project", new TextBlock(3, 4))));
reader.read(line1);
reader.read(line2);
reader.read(line3);
reader.read(line4);
assertThat(line1.getDuplicationList()).containsExactly(1);
assertThat(line2.getDuplicationList()).containsExactly(1);
assertThat(line3.getDuplicationList()).isEmpty();
assertThat(line4.getDuplicationList()).isEmpty();
}
Aggregations