diff options
Diffstat (limited to 'server/sonar-webserver-core/src')
3 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/notification/NotificationChannelTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/notification/NotificationChannelTest.java index 40b0a25d890..edd6354a881 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/notification/NotificationChannelTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/notification/NotificationChannelTest.java @@ -31,7 +31,7 @@ public class NotificationChannelTest { public void defaultMethods() { NotificationChannel channel = new FakeNotificationChannel(); assertThat(channel.getKey()).isEqualTo("FakeNotificationChannel"); - assertThat(channel.toString()).isEqualTo("FakeNotificationChannel"); + assertThat(channel).hasToString("FakeNotificationChannel"); } private static class FakeNotificationChannel extends NotificationChannel { diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java index 897d6ebe5fc..11ec21846fd 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/serverid/ServerIdFactoryImplTest.java @@ -71,7 +71,7 @@ public class ServerIdFactoryImplTest { ServerId serverId = underTest.create(); - assertThat(serverId.getDatabaseId().get()).isEqualTo(crc32Hex(sanitizedJdbcUrl)); + assertThat(serverId.getDatabaseId()).contains(crc32Hex(sanitizedJdbcUrl)); assertThat(serverId.getDatasetId()).isEqualTo(uuid); } @@ -91,7 +91,7 @@ public class ServerIdFactoryImplTest { ServerId serverId = underTest.create(currentServerId); - assertThat(serverId.getDatabaseId().get()).isEqualTo(crc32Hex(sanitizedJdbcUrl)); + assertThat(serverId.getDatabaseId()).contains(crc32Hex(sanitizedJdbcUrl)); assertThat(serverId.getDatasetId()).isEqualTo(currentServerId.getDatasetId()); } diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java index 765dc58d825..2beb1f54f47 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/telemetry/TelemetryClientTest.java @@ -61,7 +61,7 @@ public class TelemetryClientTest { Buffer body = new Buffer(); request.body().writeTo(body); assertThat(body.readUtf8()).isEqualTo(JSON); - assertThat(request.url().toString()).isEqualTo(TELEMETRY_URL); + assertThat(request.url()).hasToString(TELEMETRY_URL); } @Test @@ -79,6 +79,6 @@ public class TelemetryClientTest { Buffer body = new Buffer(); request.body().writeTo(body); assertThat(body.readUtf8()).isEqualTo(JSON); - assertThat(request.url().toString()).isEqualTo(TELEMETRY_URL); + assertThat(request.url()).hasToString(TELEMETRY_URL); } } |