From 6519110cd4f98fabf3bef46896eecbead3eb646a Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Fri, 22 Oct 2021 10:38:45 -0500 Subject: Fix code quality issues --- .../src/test/java/org/sonar/server/plugins/PluginDownloaderTest.java | 4 ++-- .../org/sonar/server/qualitygate/changeevent/QGChangeEventTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/sonar-webserver-api/src/test') 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 + "}"); -- cgit v1.2.3