use of org.sonar.scanner.scan.filesystem.ProjectCoverageAndDuplicationExclusions in project sonarqube by SonarSource.
the class ProjectCoverageExclusionsTest method shouldNotExcludeFileDuplicationBasedOnPattern.
@Test
public void shouldNotExcludeFileDuplicationBasedOnPattern() {
DefaultInputFile file = TestInputFileBuilder.create("foo", new File(baseDir, "moduleA"), new File(baseDir, "moduleA/src/org/polop/File.php")).setProjectBaseDir(baseDir.toPath()).build();
underTest = new ProjectCoverageAndDuplicationExclusions(mockConfig("", "moduleA/src/org/other/*"));
assertThat(underTest.isExcludedForCoverage(file)).isFalse();
assertThat(underTest.isExcludedForDuplication(file)).isFalse();
}
use of org.sonar.scanner.scan.filesystem.ProjectCoverageAndDuplicationExclusions in project sonarqube by SonarSource.
the class ProjectCoverageExclusionsTest method shouldNotExcludeFileCoverageBasedOnPattern.
@Test
public void shouldNotExcludeFileCoverageBasedOnPattern() {
DefaultInputFile file = TestInputFileBuilder.create("foo", new File(baseDir, "moduleA"), new File(baseDir, "moduleA/src/org/polop/File.php")).setProjectBaseDir(baseDir.toPath()).build();
underTest = new ProjectCoverageAndDuplicationExclusions(mockConfig("moduleA/src/org/other/*", ""));
assertThat(underTest.isExcludedForCoverage(file)).isFalse();
assertThat(underTest.isExcludedForDuplication(file)).isFalse();
}
use of org.sonar.scanner.scan.filesystem.ProjectCoverageAndDuplicationExclusions in project sonarqube by SonarSource.
the class ProjectCoverageExclusionsTest method shouldExcludeFileCoverageBasedOnPattern.
@Test
public void shouldExcludeFileCoverageBasedOnPattern() {
DefaultInputFile file = TestInputFileBuilder.create("foo", new File(baseDir, "moduleA"), new File(baseDir, "moduleA/src/org/polop/File.php")).setProjectBaseDir(baseDir.toPath()).build();
underTest = new ProjectCoverageAndDuplicationExclusions(mockConfig("moduleA/src/org/polop/*", ""));
assertThat(underTest.isExcludedForCoverage(file)).isTrue();
assertThat(underTest.isExcludedForDuplication(file)).isFalse();
}
use of org.sonar.scanner.scan.filesystem.ProjectCoverageAndDuplicationExclusions in project sonarqube by SonarSource.
the class ProjectCoverageExclusionsTest method shouldExcludeFileDuplicationBasedOnPattern.
@Test
public void shouldExcludeFileDuplicationBasedOnPattern() {
DefaultInputFile file = TestInputFileBuilder.create("foo", new File(baseDir, "moduleA"), new File(baseDir, "moduleA/src/org/polop/File.php")).setProjectBaseDir(baseDir.toPath()).build();
underTest = new ProjectCoverageAndDuplicationExclusions(mockConfig("", "moduleA/src/org/polop/*"));
assertThat(underTest.isExcludedForCoverage(file)).isFalse();
assertThat(underTest.isExcludedForDuplication(file)).isTrue();
}
Aggregations