aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-api
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-webserver-api')
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/exceptions/MessageTest.java6
-rw-r--r--server/sonar-webserver-api/src/test/java/org/sonar/server/project/RekeyedProjectTest.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/exceptions/MessageTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/exceptions/MessageTest.java
index 27e10c8a18a..d7bbaf89e13 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/exceptions/MessageTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/exceptions/MessageTest.java
@@ -76,8 +76,8 @@ public class MessageTest {
@Test
public void to_string() {
- assertThat(Message.of("key1 %s", "param1").toString()).isEqualTo("key1 param1");
- assertThat(Message.of("key1").toString()).isEqualTo("key1");
- assertThat(Message.of("key1", (Object[])null).toString()).isEqualTo("key1");
+ assertThat(Message.of("key1 %s", "param1")).hasToString("key1 param1");
+ assertThat(Message.of("key1")).hasToString("key1");
+ assertThat(Message.of("key1", (Object[])null)).hasToString("key1");
}
}
diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/project/RekeyedProjectTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/project/RekeyedProjectTest.java
index e175bed9b10..131545b0eb4 100644
--- a/server/sonar-webserver-api/src/test/java/org/sonar/server/project/RekeyedProjectTest.java
+++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/project/RekeyedProjectTest.java
@@ -89,7 +89,7 @@ public class RekeyedProjectTest {
String previousKey = "E";
RekeyedProject underTest = new RekeyedProject(project, previousKey);
- assertThat(underTest.toString()).isEqualTo("RekeyedProject{project=Project{uuid='A', key='B', name='C', description='D'}, previousKey='E'}");
+ assertThat(underTest).hasToString("RekeyedProject{project=Project{uuid='A', key='B', name='C', description='D'}, previousKey='E'}");
}
private static Project newRandomProject() {