diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-04-18 17:10:22 -0500 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-04-30 20:21:07 +0200 |
commit | 67bbf9427067ce40fbe792b88f18af837ddb3a9f (patch) | |
tree | d8ec93cb4f8846aca81912c4b8660b96e7902560 /sonar-scanner-protocol | |
parent | 9d399028925cbc4910751fe590435590a14b78c3 (diff) | |
download | sonarqube-67bbf9427067ce40fbe792b88f18af837ddb3a9f.tar.gz sonarqube-67bbf9427067ce40fbe792b88f18af837ddb3a9f.zip |
Upgrade assertj-core to 3.12.2 and assertj-guava to 3.2.1 for compatibility with Java 11
Diffstat (limited to 'sonar-scanner-protocol')
2 files changed, 16 insertions, 16 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 b405c69cbe3..e8d05b6ae99 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 @@ -99,8 +99,8 @@ public class ScannerReportReaderTest { .build(); writer.writeComponentIssues(1, asList(issue)); - assertThat(underTest.readComponentIssues(1)).hasSize(1); - assertThat(underTest.readComponentIssues(200)).isEmpty(); + assertThat(underTest.readComponentIssues(1)).toIterable().hasSize(1); + assertThat(underTest.readComponentIssues(200)).isExhausted(); } @Test @@ -110,13 +110,13 @@ public class ScannerReportReaderTest { .build(); writer.appendComponentExternalIssue(1, issue); - assertThat(underTest.readComponentExternalIssues(1)).hasSize(1); - assertThat(underTest.readComponentExternalIssues(200)).isEmpty(); + assertThat(underTest.readComponentExternalIssues(1)).toIterable().hasSize(1); + assertThat(underTest.readComponentExternalIssues(200)).toIterable().isEmpty(); } @Test public void empty_list_if_no_issue_found() { - assertThat(underTest.readComponentIssues(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(underTest.readComponentIssues(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty(); } @Test @@ -126,12 +126,12 @@ public class ScannerReportReaderTest { .setStringValue(StringValue.newBuilder().setValue("value_a")); writer.appendComponentMeasure(1, measure.build()); - assertThat(underTest.readComponentMeasures(1)).hasSize(1); + assertThat(underTest.readComponentMeasures(1)).toIterable().hasSize(1); } @Test public void empty_list_if_no_measure_found() { - assertThat(underTest.readComponentMeasures(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(underTest.readComponentMeasures(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty(); } @Test @@ -175,12 +175,12 @@ public class ScannerReportReaderTest { writer.writeComponentDuplications(1, asList(duplication)); ScannerReportReader sut = new ScannerReportReader(dir); - assertThat(sut.readComponentDuplications(1)).hasSize(1); + assertThat(sut.readComponentDuplications(1)).toIterable().hasSize(1); } @Test public void empty_list_if_no_duplication_found() { - assertThat(underTest.readComponentDuplications(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(underTest.readComponentDuplications(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty(); } @Test @@ -201,12 +201,12 @@ public class ScannerReportReaderTest { writer.writeCpdTextBlocks(1, singletonList(duplicationBlock)); ScannerReportReader sut = new ScannerReportReader(dir); - assertThat(sut.readCpdTextBlocks(1)).hasSize(1); + assertThat(sut.readCpdTextBlocks(1)).toIterable().hasSize(1); } @Test public void empty_list_if_no_duplication_block_found() { - assertThat(underTest.readComponentDuplications(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(underTest.readComponentDuplications(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty(); } @Test @@ -238,7 +238,7 @@ public class ScannerReportReaderTest { @Test public void return_empty_if_no_highlighting_found() { - assertThat(underTest.readComponentSyntaxHighlighting(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(underTest.readComponentSyntaxHighlighting(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty(); } @Test @@ -266,12 +266,12 @@ public class ScannerReportReaderTest { .build())); underTest = new ScannerReportReader(dir); - assertThat(underTest.readComponentSymbols(1)).hasSize(1); + assertThat(underTest.readComponentSymbols(1)).toIterable().hasSize(1); } @Test public void empty_list_if_no_symbol_found() { - assertThat(underTest.readComponentSymbols(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(underTest.readComponentSymbols(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty(); } @Test @@ -309,7 +309,7 @@ public class ScannerReportReaderTest { @Test public void return_empty_iterator_if_no_coverage_found() { - assertThat(underTest.readComponentCoverage(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(underTest.readComponentCoverage(UNKNOWN_COMPONENT_REF)).toIterable().isEmpty(); } @Test diff --git a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java index ade53f3bca5..a6c69bbe61d 100644 --- a/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java +++ b/sonar-scanner-protocol/src/test/java/org/sonar/scanner/protocol/output/ScannerReportWriterTest.java @@ -301,7 +301,7 @@ public class ScannerReportWriterTest { File file = underTest.getFileStructure().fileFor(FileStructure.Domain.SYMBOLS, 1); assertThat(file).exists().isFile(); try (CloseableIterator<ScannerReport.Symbol> read = Protobuf.readStream(file, ScannerReport.Symbol.parser())) { - assertThat(read).hasSize(1); + assertThat(read).toIterable().hasSize(1); } } |