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-war-plugin.git
commit dd18cfe895cd8811ea0a459675dee2bfcdb93026 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Tue Nov 17 03:01:30 2026 +0000 Use JUnit 5 assertions and Mockito best practices in tests --- .../maven/plugins/war/packaging/AbstractWarPackagingTaskTest.java | 5 ++--- src/test/java/org/apache/maven/plugins/war/util/PathSetTest.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTaskTest.java b/src/test/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTaskTest.java index 7b5fc20..2fce1a4 100644 --- a/src/test/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTaskTest.java +++ b/src/test/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTaskTest.java @@ -19,7 +19,6 @@ package org.apache.maven.plugins.war.packaging; import java.io.File; -import java.io.IOException; import java.util.Locale; import org.junit.jupiter.api.Test; @@ -42,7 +41,7 @@ class AbstractWarPackagingTaskTest { } @Test - void testCopyFileRemovesExecutablePermissions() throws IOException { + void testCopyFileRemovesExecutablePermissions() throws Exception { assumeFalse(isWindows()); File source = new File(tempDir, "source.jar"); assertTrue(source.createNewFile()); @@ -63,7 +62,7 @@ class AbstractWarPackagingTaskTest { } @Test - void testCopyFilePreservesNonExecutable() throws IOException { + void testCopyFilePreservesNonExecutable() throws Exception { assumeFalse(isWindows()); File source = new File(tempDir, "source.jar"); assertTrue(source.createNewFile()); diff --git a/src/test/java/org/apache/maven/plugins/war/util/PathSetTest.java b/src/test/java/org/apache/maven/plugins/war/util/PathSetTest.java index cca89b0..c404156 100644 --- a/src/test/java/org/apache/maven/plugins/war/util/PathSetTest.java +++ b/src/test/java/org/apache/maven/plugins/war/util/PathSetTest.java @@ -200,7 +200,7 @@ public class PathSetTest { * @throws IOException if an io error occurred */ @Test - public void testAddAllFilesInDirectory() throws IOException { + public void testAddAllFilesInDirectory() throws Exception { PathSet ps = new PathSet(); /* Preparing directory structure*/
