This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-invoker-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 120cad9  JUnit Jupiter best practices (#691)
120cad9 is described below

commit 120cad9cd016e562907d820d05e351acbc29c55b
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Mon Nov 10 03:53:50 2025 +0100

    JUnit Jupiter best practices (#691)
    
    
    Co-authored-by: Moderne <[email protected]>
---
 .../maven/plugins/invoker/InterpolationTest.java   |  4 +-
 .../maven/plugins/invoker/InvokerMojoTest.java     | 14 +++---
 .../plugins/invoker/InvokerPropertiesTest.java     | 52 +++++++++++-----------
 .../apache/maven/plugins/invoker/SelectorTest.java |  6 +--
 .../maven/plugins/invoker/SelectorUtilsTest.java   | 13 +++---
 5 files changed, 44 insertions(+), 45 deletions(-)

diff --git 
a/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java 
b/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java
index 6e0be14..74ceb0e 100644
--- a/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java
+++ b/src/test/java/org/apache/maven/plugins/invoker/InterpolationTest.java
@@ -55,7 +55,7 @@ class InterpolationTest {
     }
 
     @Test
-    void testCompositeMap() {
+    void compositeMap() {
         Map<String, Object> properties = new HashMap<>();
         properties.put("foo", "bar");
         properties.put("version", "2.0-SNAPSHOT");
@@ -68,7 +68,7 @@ class InterpolationTest {
     }
 
     @Test
-    void testPomInterpolation() throws Exception {
+    void pomInterpolation() throws Exception {
         InvokerMojo invokerMojo = new InvokerMojo(null, null, null, null);
         TestUtil.setVariableValueToObject(invokerMojo, "project", 
buildMavenProjectStub());
         TestUtil.setVariableValueToObject(invokerMojo, "settings", new 
Settings());
diff --git 
a/src/test/java/org/apache/maven/plugins/invoker/InvokerMojoTest.java 
b/src/test/java/org/apache/maven/plugins/invoker/InvokerMojoTest.java
index 529e1f2..079416b 100644
--- a/src/test/java/org/apache/maven/plugins/invoker/InvokerMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/invoker/InvokerMojoTest.java
@@ -51,7 +51,7 @@ class InvokerMojoTest {
     }
 
     @Test
-    void testSingleInvokerTest() throws Exception {
+    void singleInvokerTest() throws Exception {
         // given
         MavenProject mavenProject = getMavenProject();
         String dirPath = getBasedir() + "/src/test/resources/unit";
@@ -70,7 +70,7 @@ class InvokerMojoTest {
     }
 
     @Test
-    void testMultiInvokerTest() throws Exception {
+    void multiInvokerTest() throws Exception {
         // given
         MavenProject mavenProject = getMavenProject();
         String dirPath = getBasedir() + "/src/test/resources/unit";
@@ -89,7 +89,7 @@ class InvokerMojoTest {
     }
 
     @Test
-    void testFullPatternInvokerTest() throws Exception {
+    void fullPatternInvokerTest() throws Exception {
         // given
         MavenProject mavenProject = getMavenProject();
         String dirPath = getBasedir() + "/src/test/resources/unit";
@@ -111,7 +111,7 @@ class InvokerMojoTest {
     }
 
     @Test
-    void testSetupInProjectList() throws Exception {
+    void setupInProjectList() throws Exception {
         // given
         MavenProject mavenProject = getMavenProject();
         String dirPath = getBasedir() + "/src/test/resources/unit";
@@ -140,7 +140,7 @@ class InvokerMojoTest {
     }
 
     @Test
-    void testSetupProjectIsFiltered() throws Exception {
+    void setupProjectIsFiltered() throws Exception {
         // given
         String dirPath = getBasedir() + "/src/test/resources/unit";
         setVariableValueToObject(invokerMojo, "projectsDirectory", new 
File(dirPath));
@@ -167,7 +167,7 @@ class InvokerMojoTest {
     }
 
     @Test
-    void testAlreadyCloned() {
+    void alreadyCloned() {
         assertThat(AbstractInvokerMojo.alreadyCloned("dir", 
Collections.emptyList()))
                 .isFalse();
         assertThat(AbstractInvokerMojo.alreadyCloned("dir", 
Collections.singletonList("dir")))
@@ -179,7 +179,7 @@ class InvokerMojoTest {
     }
 
     @Test
-    void testParallelThreadsSettings() throws Exception {
+    void parallelThreadsSettings() throws Exception {
         Object[][] testValues = {
             {"4", 4},
             {"1C", Runtime.getRuntime().availableProcessors()},
diff --git 
a/src/test/java/org/apache/maven/plugins/invoker/InvokerPropertiesTest.java 
b/src/test/java/org/apache/maven/plugins/invoker/InvokerPropertiesTest.java
index 58285f8..bb67981 100644
--- a/src/test/java/org/apache/maven/plugins/invoker/InvokerPropertiesTest.java
+++ b/src/test/java/org/apache/maven/plugins/invoker/InvokerPropertiesTest.java
@@ -55,13 +55,13 @@ class InvokerPropertiesTest {
     private InvocationRequest request;
 
     @Test
-    void testConstructorNullSafe() {
+    void constructorNullSafe() {
         InvokerProperties facade = new InvokerProperties(null);
         assertThat(facade.getProperties()).isNotNull();
     }
 
     @Test
-    void testGetInvokerProperty() {
+    void getInvokerProperty() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -76,7 +76,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testGetJobName() {
+    void getJobName() {
         Properties props = new Properties();
         final String jobName = "Build Job name";
         props.put("invoker.name", jobName);
@@ -86,7 +86,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testIsExpectedResult() {
+    void isExpectedResult() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -103,7 +103,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestEmptyProperties() {
+    void configureRequestEmptyProperties() {
 
         InvokerProperties facade = new InvokerProperties(null);
 
@@ -112,7 +112,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestGoals() {
+    void configureRequestGoals() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -149,7 +149,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestProfiles() {
+    void configureRequestProfiles() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -185,7 +185,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestProject() throws Exception {
+    void configureRequestProject() throws Exception {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -211,7 +211,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestMavenExecutable() {
+    void configureRequestMavenExecutable() {
         Properties props = new Properties();
 
         InvokerProperties facade = new InvokerProperties(props);
@@ -232,7 +232,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestMavenOpts() {
+    void configureRequestMavenOpts() {
         Properties props = new Properties();
 
         InvokerProperties facade = new InvokerProperties(props);
@@ -252,7 +252,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestFailureBehavior() {
+    void configureRequestFailureBehavior() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -264,7 +264,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestFailureBehaviorUnKnownName() {
+    void configureRequestFailureBehaviorUnKnownName() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -278,7 +278,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestRecursion() {
+    void configureRequestRecursion() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -295,7 +295,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestOffline() {
+    void configureRequestOffline() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -312,7 +312,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestDebug() {
+    void configureRequestDebug() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -343,7 +343,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestQuiet() {
+    void configureRequestQuiet() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -374,7 +374,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureRequestTimeoutInSeconds() {
+    void configureRequestTimeoutInSeconds() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -393,7 +393,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureEnvironmentVariables() {
+    void configureEnvironmentVariables() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -411,7 +411,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureEnvironmentVariablesWithIndex() {
+    void configureEnvironmentVariablesWithIndex() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -429,7 +429,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureUpdateSnapshots() {
+    void configureUpdateSnapshots() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -447,7 +447,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testConfigureUpdateSnapshotsDefault() {
+    void configureUpdateSnapshotsDefault() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -464,7 +464,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testIsInvocationDefined() {
+    void isInvocationDefined() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -486,7 +486,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testIsSelectedDefined() {
+    void isSelectedDefined() {
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
 
@@ -508,7 +508,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testGetToolchainsForEmptyProperties() {
+    void getToolchainsForEmptyProperties() {
 
         Properties props = new Properties();
         InvokerProperties facade = new InvokerProperties(props);
@@ -521,7 +521,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testGetToolchains() {
+    void getToolchains() {
         Properties props = new Properties();
         props.put("invoker.toolchain.jdk.version", "11");
         InvokerProperties facade = new InvokerProperties(props);
@@ -534,7 +534,7 @@ class InvokerPropertiesTest {
     }
 
     @Test
-    void testGetToolchainsWithIndex() {
+    void getToolchainsWithIndex() {
         Properties props = new Properties();
         props.put("selector.1.invoker.toolchain.jdk.version", "11");
         InvokerProperties facade = new InvokerProperties(props);
diff --git a/src/test/java/org/apache/maven/plugins/invoker/SelectorTest.java 
b/src/test/java/org/apache/maven/plugins/invoker/SelectorTest.java
index d55875c..8c94a6c 100644
--- a/src/test/java/org/apache/maven/plugins/invoker/SelectorTest.java
+++ b/src/test/java/org/apache/maven/plugins/invoker/SelectorTest.java
@@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat;
  */
 class SelectorTest {
     @Test
-    void testGlobalMatch() {
+    void globalMatch() {
         Selector selector = new Selector("3.2.5", "1.7", null);
 
         Properties props = new Properties();
@@ -39,7 +39,7 @@ class SelectorTest {
     }
 
     @Test
-    void testSelectorMatch() {
+    void selectorMatch() {
         Selector selector = new Selector("3.2.5", "1.7", null);
 
         Properties props = new Properties();
@@ -52,7 +52,7 @@ class SelectorTest {
     }
 
     @Test
-    void testSelectorWithGlobalMatch() {
+    void selectorWithGlobalMatch() {
         Selector selector = new Selector("3.2.5", "1.7", null);
 
         Properties props = new Properties();
diff --git 
a/src/test/java/org/apache/maven/plugins/invoker/SelectorUtilsTest.java 
b/src/test/java/org/apache/maven/plugins/invoker/SelectorUtilsTest.java
index 8f72bfa..c2e6662 100644
--- a/src/test/java/org/apache/maven/plugins/invoker/SelectorUtilsTest.java
+++ b/src/test/java/org/apache/maven/plugins/invoker/SelectorUtilsTest.java
@@ -19,7 +19,6 @@
 package org.apache.maven.plugins.invoker;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -43,7 +42,7 @@ import static org.mockito.Mockito.when;
 class SelectorUtilsTest {
 
     @Test
-    void testParseList() {
+    void parseList() {
         List<String> includes = new ArrayList<>();
         List<String> excludes = new ArrayList<>();
 
@@ -55,14 +54,14 @@ class SelectorUtilsTest {
     }
 
     @Test
-    void testParseVersion() {
+    void parseVersion() {
         assertThat(SelectorUtils.parseVersion("1.6.0_12")).containsExactly(1, 
6, 0, 12);
         assertThat(SelectorUtils.parseVersion("1.6.0_12+")).containsExactly(1, 
6, 0, 12);
         assertThat(SelectorUtils.parseVersion("1.6.0_12-")).containsExactly(1, 
6, 0, 12);
     }
 
     @Test
-    void testCompareVersions() {
+    void compareVersions() {
         assertThat(SelectorUtils.compareVersions(Arrays.asList(1, 6), 
Arrays.asList(1, 6)))
                 .isZero();
 
@@ -78,7 +77,7 @@ class SelectorUtilsTest {
     }
 
     @Test
-    void testIsMatchingJre() {
+    void isMatchingJre() {
 
         assertThat(SelectorUtils.isJreVersion(Arrays.asList(1, 4, 2, 8), 
"1.5")).isFalse();
         assertThat(SelectorUtils.isJreVersion(Arrays.asList(1, 5), 
"1.5")).isTrue();
@@ -102,7 +101,7 @@ class SelectorUtilsTest {
     }
 
     @Test
-    void testIsMatchingToolchain() throws Exception {
+    void isMatchingToolchain() throws Exception {
         InvokerToolchain openJdk9 = new InvokerToolchain("jdk");
         openJdk9.addProvides("version", "9");
         openJdk9.addProvides("vendor", "openJDK");
@@ -151,7 +150,7 @@ class SelectorUtilsTest {
     }
 
     @Test
-    void mavenVersionFromMavenHome() throws IOException {
+    void mavenVersionFromMavenHome() throws Exception {
         File mavenHome = new File(System.getProperty("maven.home"));
 
         String mavenVersion = SelectorUtils.getMavenVersion(mavenHome);

Reply via email to