From 0264c36608a41efc4cfbe75e990422b4722a5644 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 21 Dec 2025 13:36:11 +0000 Subject: [PATCH] Cleanup tests Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.testing.junit5.JUnit5BestPractices?organizationId=YTA5ODhiOTYtNDI5OS00OGY3LTg0NjctNGZiNmI4OTY1ZjY3 Co-authored-by: Moderne --- .../antrun/AntrunXmlPlexusConfigurationWriterTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java b/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java index 4d609a3..d256423 100644 --- a/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java +++ b/src/test/java/org/apache/maven/plugins/antrun/AntrunXmlPlexusConfigurationWriterTest.java @@ -37,7 +37,7 @@ * Test class for {@link AntrunXmlPlexusConfigurationWriter}. * @author gboue */ -public class AntrunXmlPlexusConfigurationWriterTest { +class AntrunXmlPlexusConfigurationWriterTest { private static final String TARGET_NAME = "main"; @@ -64,7 +64,7 @@ void setUp() throws IOException { * @throws IOException In case of problems */ @Test - public void testBasic() throws IOException { + void basic() throws Exception { configuration.getChild("echo", true).setAttribute("message", "Hello"); configurationWriter.write(configuration, file, "", TARGET_NAME); assertXmlIsExpected("/configuration-writer/basic.xml", file); @@ -76,7 +76,7 @@ public void testBasic() throws IOException { * @throws IOException In case of problems */ @Test - public void testEmptyTarget() throws IOException { + void emptyTarget() throws Exception { configurationWriter.write(configuration, file, "", TARGET_NAME); assertXmlIsExpected("/configuration-writer/empty-target.xml", file); } @@ -87,7 +87,7 @@ public void testEmptyTarget() throws IOException { * @throws IOException In case of problems */ @Test - public void testCustomTaskPrefix() throws IOException { + void customTaskPrefix() throws Exception { PlexusConfiguration child = configuration.getChild("mvn:foo", true); child.setAttribute("attr1", "val1"); child.setValue("The first value."); @@ -105,7 +105,7 @@ public void testCustomTaskPrefix() throws IOException { * @throws IOException In case of problems */ @Test - public void testCombineAttributes() throws IOException { + void combineAttributes() throws Exception { configuration.setAttribute("combine.children", "append"); configuration.setAttribute("description", "foo"); configuration.getChild("child", true).setAttribute("combine.self", "override");