From a6e15d61dc23c2d042cb4af26ed166868c31bcdc Mon Sep 17 00:00:00 2001 From: Roman Korostinskiy <70313618+c71n93@users.noreply.github.com> Date: Mon, 25 Mar 2024 12:39:05 +0300 Subject: [PATCH] #2937 remove SuppressWarnings --- .../src/test/java/org/eolang/maven/PlaceTest.java | 5 ----- .../java/org/eolang/maven/dependencies/DcsDepgraphTest.java | 3 --- .../maven/dependencies/DcsEachWithoutTransitiveTest.java | 6 ------ .../org/eolang/maven/dependencies/DcsWithRuntimeTest.java | 4 ---- 4 files changed, 18 deletions(-) diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/PlaceTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/PlaceTest.java index 9fe8c11336..806c35e819 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/PlaceTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/PlaceTest.java @@ -33,14 +33,10 @@ * Test case for {@link Place}. * * @since 0.11 - * @todo #2297:60min Add message to all JUnit assertions and remove corresponding - * {@code @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage")} annotation. */ -@SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") final class PlaceTest { @Test - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void makesPath() { MatcherAssert.assertThat( new Place("hello.foo.bar") @@ -52,7 +48,6 @@ void makesPath() { } @Test - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void makesSimplePath() { MatcherAssert.assertThat( new Place("hey") diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsDepgraphTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsDepgraphTest.java index dbe72fb2bd..f694161141 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsDepgraphTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsDepgraphTest.java @@ -39,8 +39,6 @@ * Test case for {@link DcsDepgraph.DcsJson}. * * @since 0.28.11 - * @todo #2297:60min Add message to all JUnit assertions and remove corresponding - * {@code @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage")} annotation. */ final class DcsDepgraphTest { @@ -49,7 +47,6 @@ final class DcsDepgraphTest { "eo-math-dependencies-transient-dependency.json, 3", "eo-math-dependencies-without-foreign.json, 7" }) - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void readsAllDependenciesFromJsonFile( final String name, final long number, diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsEachWithoutTransitiveTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsEachWithoutTransitiveTest.java index a2298ff0ef..22339cc5ee 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsEachWithoutTransitiveTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsEachWithoutTransitiveTest.java @@ -37,13 +37,10 @@ * Test case for {@link DcsEachWithoutTransitive}. * * @since 0.30 - * @todo #2297:60min Add message to all JUnit assertions and remove corresponding - * {@code @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage")} annotation. */ final class DcsEachWithoutTransitiveTest { @Test - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void failsIfHasTransitiveDependencies() { Assertions.assertThrows( IllegalStateException.class, @@ -55,7 +52,6 @@ void failsIfHasTransitiveDependencies() { } @Test - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void keepsDependenciesThatHaveTeStDependenciesAsTransitive() { final DcsFake original = new DcsFake(); MatcherAssert.assertThat( @@ -68,7 +64,6 @@ void keepsDependenciesThatHaveTeStDependenciesAsTransitive() { } @Test - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void keepsDependencyThatHasTheSameDependencyAsTransitive() { final DcsFake original = new DcsFake(); MatcherAssert.assertThat( @@ -81,7 +76,6 @@ void keepsDependencyThatHasTheSameDependencyAsTransitive() { } @Test - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void keepsDependencyThatHasRuntimeDependencyAsTransitive() { final DcsFake original = new DcsFake(); MatcherAssert.assertThat( diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsWithRuntimeTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsWithRuntimeTest.java index 259203e5ab..44f7dd0adb 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsWithRuntimeTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/dependencies/DcsWithRuntimeTest.java @@ -33,14 +33,11 @@ * Test case for {@link DcsWithRuntime}. * * @since 0.28.11 - * @todo #2297:60min Add message to all JUnit assertions and remove corresponding - * {@code @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage")} annotation. */ final class DcsWithRuntimeTest { @Test @ExtendWith(WeAreOnline.class) - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void addsHardcodedVersionOfRuntimeDependency() { MatcherAssert.assertThat( new DcsWithRuntime( @@ -53,7 +50,6 @@ void addsHardcodedVersionOfRuntimeDependency() { @Test @ExtendWith(WeAreOnline.class) - @SuppressWarnings("PMD.JUnitAssertionsShouldIncludeMessage") void addsRemoteVersionOfRuntimeDependency() { MatcherAssert.assertThat( new DcsWithRuntime(