aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-api
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2021-10-22 10:38:45 -0500
committersonartech <sonartech@sonarsource.com>2021-10-25 20:03:24 +0000
commit6519110cd4f98fabf3bef46896eecbead3eb646a (patch)
treead84a08da8ba0d590dd1a2d5e9bd2f85ff1c8a8e /server/sonar-webserver-api
parent7525c90c3f489b47e902e5f8eecce2c9deab9658 (diff)
downloadsonarqube-6519110cd4f98fabf3bef46896eecbead3eb646a.tar.gz
sonarqube-6519110cd4f98fabf3bef46896eecbead3eb646a.zip
Fix code quality issues
Diffstat (limited to 'server/sonar-webserver-api')
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java4
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventTest.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java
index c45ce0c2f11..50bb1bca588 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java
@@ -196,7 +196,7 @@ public class PluginDownloaderTest {
pluginDownloader.start();
pluginDownloader.download("foo", create("1.0"));
verify(httpDownloader, never()).download(any(URI.class), any(File.class));
- assertThat(noDownloadedFiles()).isGreaterThan(0);
+ assertThat(noDownloadedFiles()).isPositive();
}
@Test
@@ -270,7 +270,7 @@ public class PluginDownloaderTest {
file2.createNewFile();
pluginDownloader.start();
- assertThat(noDownloadedFiles()).isGreaterThan(0);
+ assertThat(noDownloadedFiles()).isPositive();
pluginDownloader.cancelDownloads();
assertThat(noDownloadedFiles()).isZero();
}
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventTest.java
index 71395cb1106..754f7f0e5e9 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/qualitygate/changeevent/QGChangeEventTest.java
@@ -123,8 +123,8 @@ public class QGChangeEventTest {
public void overrides_toString() {
QGChangeEvent underTest = new QGChangeEvent(project, branch, analysis, configuration, previousStatus, supplier);
- assertThat(underTest.toString())
- .isEqualTo("QGChangeEvent{project=bar:foo, branch=BRANCH:bar:doh:zop, analysis=pto:8999999765" +
+ assertThat(underTest)
+ .hasToString("QGChangeEvent{project=bar:foo, branch=BRANCH:bar:doh:zop, analysis=pto:8999999765" +
", projectConfiguration=" + configuration.toString() +
", previousStatus=" + previousStatus +
", qualityGateSupplier=" + supplier + "}");