aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-protocol/src/it/java/org/sonar
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2024-10-10 16:18:16 +0200
committersonartech <sonartech@sonarsource.com>2024-10-21 20:03:59 +0000
commit67768656bfe3462a6554ffc236da801cffd20f54 (patch)
tree679a49a4e06a84fe9f18c81eae578959fdf0d0e9 /sonar-scanner-protocol/src/it/java/org/sonar
parentdd9ebd6a6f4b59c38ce1f1ca494f1d4231291513 (diff)
downloadsonarqube-67768656bfe3462a6554ffc236da801cffd20f54.tar.gz
sonarqube-67768656bfe3462a6554ffc236da801cffd20f54.zip
SONAR-23098 Add dependencies to the scanner report
Diffstat (limited to 'sonar-scanner-protocol/src/it/java/org/sonar')
-rw-r--r--sonar-scanner-protocol/src/it/java/org/sonar/scanner/protocol/output/ScannerReportReaderIT.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sonar-scanner-protocol/src/it/java/org/sonar/scanner/protocol/output/ScannerReportReaderIT.java b/sonar-scanner-protocol/src/it/java/org/sonar/scanner/protocol/output/ScannerReportReaderIT.java
index 7aa0556e55a..0ceaaca8673 100644
--- a/sonar-scanner-protocol/src/it/java/org/sonar/scanner/protocol/output/ScannerReportReaderIT.java
+++ b/sonar-scanner-protocol/src/it/java/org/sonar/scanner/protocol/output/ScannerReportReaderIT.java
@@ -370,6 +370,16 @@ public class ScannerReportReaderIT {
}
@Test
+ public void read_dependencies() {
+ ScannerReportWriter writer = new ScannerReportWriter(fileStructure);
+ ScannerReport.Dependency dep = ScannerReport.Dependency.newBuilder()
+ .build();
+ writer.appendDependency(dep);
+
+ assertThat(underTest.readDependencies()).toIterable().hasSize(1);
+ }
+
+ @Test
public void return_null_when_no_file_source() {
assertThat(underTest.readFileSource(UNKNOWN_COMPONENT_REF)).isNull();
}