use of org.sonar.ce.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))));
assertThat(reader.read(line1)).isEmpty();
assertThat(reader.read(line2)).isEmpty();
assertThat(reader.read(line3)).isEmpty();
assertThat(reader.read(line4)).isEmpty();
assertThat(line1.getDuplicationList()).containsExactly(1);
assertThat(line2.getDuplicationList()).containsExactly(1);
assertThat(line3.getDuplicationList()).isEmpty();
assertThat(line4.getDuplicationList()).isEmpty();
}
Aggregations