diff options
Diffstat (limited to 'sonar-plugin-api')
3 files changed, 4 insertions, 4 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java index 4e85bae02d4..fa1858ad0cb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/bootstrap/ProjectDefinitionTest.java @@ -47,7 +47,7 @@ public class ProjectDefinitionTest { ProjectDefinition def = ProjectDefinition.create(); def.setProjectVersion(null); assertThat(def.getVersion()).isEqualTo("not provided"); - assertThat(def.getOriginalVersion()).isEqualTo(""); + assertThat(def.getOriginalVersion()).isEmpty(); } @Test diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/internal/DefaultRuleTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/internal/DefaultRuleTest.java index 4d266504e4f..8a0c4d7e441 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/internal/DefaultRuleTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/server/rule/internal/DefaultRuleTest.java @@ -80,6 +80,6 @@ public class DefaultRuleTest { DefaultNewRule rule = new DefaultNewRule("plugin", "repo", "key"); DefaultRule defaultRule = new DefaultRule(repo, rule); - assertThat(defaultRule.toString()).isEqualTo("[repository=repo, key=key]"); + assertThat(defaultRule).hasToString("[repository=repo, key=key]"); } } diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java index e7cd86d0b04..13a3ed405b5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/DurationTest.java @@ -134,8 +134,8 @@ public class DurationTest { assertThat(durationWithDifferentValue).isNotEqualTo(duration); assertThat(duration).isNotEqualTo(null); - assertThat(duration.hashCode()).isEqualTo(duration.hashCode()); - assertThat(durationWithSameValue.hashCode()).isEqualTo(duration.hashCode()); + assertThat(duration).hasSameHashCodeAs(duration); + assertThat(durationWithSameValue).hasSameHashCodeAs(duration); assertThat(durationWithDifferentValue.hashCode()).isNotEqualTo(duration.hashCode()); } |