diff options
Diffstat (limited to 'server/sonar-main')
3 files changed, 10 insertions, 9 deletions
diff --git a/server/sonar-main/src/test/java/org/sonar/application/command/JvmOptionsTest.java b/server/sonar-main/src/test/java/org/sonar/application/command/JvmOptionsTest.java index 3e23bed0305..3c6b727efcb 100644 --- a/server/sonar-main/src/test/java/org/sonar/application/command/JvmOptionsTest.java +++ b/server/sonar-main/src/test/java/org/sonar/application/command/JvmOptionsTest.java @@ -338,7 +338,7 @@ public class JvmOptionsTest { public void toString_prints_all_jvm_options() { underTest.add("-foo").add("-bar"); - assertThat(underTest.toString()).isEqualTo("[-foo, -bar]"); + assertThat(underTest).hasToString("[-foo, -bar]"); } private void expectJvmOptionNotNullNPE(ThrowingCallable callback) { diff --git a/server/sonar-main/src/test/java/org/sonar/application/config/AppSettingsImplTest.java b/server/sonar-main/src/test/java/org/sonar/application/config/AppSettingsImplTest.java index e42c4bf13bd..c274323d413 100644 --- a/server/sonar-main/src/test/java/org/sonar/application/config/AppSettingsImplTest.java +++ b/server/sonar-main/src/test/java/org/sonar/application/config/AppSettingsImplTest.java @@ -38,8 +38,8 @@ public class AppSettingsImplTest { AppSettingsImpl underTest = new AppSettingsImpl(initialProps); underTest.reload(newProps); - assertThat(underTest.getValue("foo").get()).isEqualTo("baz"); - assertThat(underTest.getValue("newProp").get()).isEqualTo("newVal"); + assertThat(underTest.getValue("foo")).contains("baz"); + assertThat(underTest.getValue("newProp")).contains("newVal"); assertThat(underTest.getProps().rawProperties()).hasSize(2); } } diff --git a/server/sonar-main/src/test/java/org/sonar/application/es/EsYmlSettingsTest.java b/server/sonar-main/src/test/java/org/sonar/application/es/EsYmlSettingsTest.java index 30c1284c18c..fe7887e2d7d 100644 --- a/server/sonar-main/src/test/java/org/sonar/application/es/EsYmlSettingsTest.java +++ b/server/sonar-main/src/test/java/org/sonar/application/es/EsYmlSettingsTest.java @@ -39,14 +39,15 @@ public class EsYmlSettingsTest { File yamlFile = temp.newFile(); new EsYmlSettings(new HashMap<>()).writeToYmlSettingsFile(yamlFile); - assertThat(yamlFile).exists(); - assertThat(yamlFile).hasContent(""" - # This file has been automatically generated by SonarQube during startup. + assertThat(yamlFile) + .exists() + .hasContent(""" + # This file has been automatically generated by SonarQube during startup. - # DO NOT EDIT THIS FILE + # DO NOT EDIT THIS FILE - { - }"""); + { + }"""); } @Test |