diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2024-10-10 16:18:16 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-10-21 20:03:59 +0000 |
commit | 67768656bfe3462a6554ffc236da801cffd20f54 (patch) | |
tree | 679a49a4e06a84fe9f18c81eae578959fdf0d0e9 /sonar-scanner-protocol/src/it/java/org/sonar | |
parent | dd9ebd6a6f4b59c38ce1f1ca494f1d4231291513 (diff) | |
download | sonarqube-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.java | 10 |
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(); } |