aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-protocol
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2022-03-23 14:53:02 -0500
committersonartech <sonartech@sonarsource.com>2022-03-24 20:03:07 +0000
commit6f055b4762d71bc42d561974e1c157d5ab036602 (patch)
tree77b0279af82458c5bc1eb22e45de03fb296b1fbe /sonar-scanner-protocol
parentde2a43957a00a246a9e877a30a04eabae33a6973 (diff)
downloadsonarqube-6f055b4762d71bc42d561974e1c157d5ab036602.tar.gz
sonarqube-6f055b4762d71bc42d561974e1c157d5ab036602.zip
Improve SQ code quality
Diffstat (limited to 'sonar-scanner-protocol')
-rw-r--r--sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
index 269bacef2d4..e7588076b57 100644
--- a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
+++ b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportReaderTest.java
@@ -226,6 +226,12 @@ public class ScannerReportReaderTest {
}
@Test
+ public void read_analysis_cache_returns_null_if_no_file_exists() {
+ ScannerReportReader reader = new ScannerReportReader(dir);
+ assertThat(reader.getAnalysisCache()).isNull();
+ }
+
+ @Test
public void empty_list_if_no_duplication_block_found() {
assertThat(underTest.readComponentDuplications(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty();
}